Table of Contents

IsGuid Method

Definition

Namespace
Cuemon
Assemblies
Cuemon.Kernel.dll
Source
src/Cuemon.Kernel/Condition.cs

IsGuid(string)

Determines whether the specified value has a valid format of a Guid.

public static bool IsGuid(string value)

Parameters

value string

The string to verify has a valid format of a Guid.

Returns

bool

true if the specified value has a format of a Guid; otherwise, false.

Remarks

This implementation only evaluates for GUID formats of: D | B | P, eg. 32 digits separated by hyphens; 32 digits separated by hyphens, enclosed in brackets and 32 digits separated by hyphens, enclosed in parentheses.
The reason not to include N, eg. 32 digits is the possible unintended GUID result of a MD5 string representation.

IsGuid(string, GuidFormats)

Determines whether the specified value has a valid format of a Guid.

public static bool IsGuid(string value, GuidFormats format)

Parameters

value string

The string to verify has a valid format of a Guid.

format GuidFormats

A bitmask comprised of one or more GuidFormats that specify how the GUID parsing is conducted.

Returns

bool

true if the specified value has a format of a Guid; otherwise, false.