Back to "Простий valid Guid..."

This is a viewer only at the moment see the article on how this works.

To update the preview hit Ctrl-Alt-R (or ⌘-Alt-R on Mac) or Enter to refresh. The Save icon lets you save the markdown file to disk

This is a preview from the server running through my markdig pipeline

C# Imported mostlylucidcouk Software Development

Простий valid Guid...

Wednesday, 19 May 2004

Ще один з моїх досить простих функцій (по суті, його написав мій колега, Джонні Андерсон) - цього разу просто, щоб підтвердити Гвід - у цій реалізації ви передаєте Giid як параметр "out" разом з рядком, який ви хочете перевірити - він заповнює Giid і повертає true / false, залежно від того, чи дійсно Gid був коректним...

конфіденційний статичний формальний вираз isGuid = новий формальний вираз@ "^}{){0,1}[0- 9a- fA- F] {8}-[0- 9a- fA- F] {4}-[0- 9a- fA- F] {4}-[0- 9a- fA- F] {4}-[0- 9a- fA- F] {12}♪) {0, 1} $ ," RegexOptions. Complete);

внутрішнє статичне bool IsGuid}рядковий кандидат, вивід Gid)

{

bool isValid = false;

output=Guid.Empty;

if}candidate!=null)

{

if (isGuid. IsMatch}candidate)

{

output=new Guid} candate);

isValid = true;

}

}

Return isValid;

} ?>

logo

© 2026 Scott Galloway — Unlicense — All content and source code on this site is free to use, copy, modify, and sell.