StringExtensions.ToGuid method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Strings.Extensions
Assembly Skybrud.Essentials.dll

ToGuid(string)

Extension method

Parses input to an instance of Guid . If the conversion fails, System.Guid.Empty will be returned instead.

public static Guid ToGuid(this string input)

Parameters

input String

The input string to be converted.

Returns

An instance of Guid .

ToGuid(string, Guid)

Extension method

Parses input to an instance of Guid . If the conversion fails, fallback will be returned instead.

public static Guid ToGuid(this string input, Guid fallback)

Parameters

input String

The input string to be converted.

fallback Guid

The fallback value that will be returned if the conversion fails.

Returns

An instance of Guid .