Class GuidUtils
Utility methods for the
Inheritance
System.Object
Namespace: Umbraco.Cms.Core
Assembly: Umbraco.Core.dll
Syntax
public static class GuidUtils
Methods
View SourceCombine(Guid, Guid)
Combines two guid instances utilizing an exclusive disjunction. The resultant guid is not guaranteed to be unique since the number of unique bits is halved.
Declaration
public static Guid Combine(Guid a, Guid b)
Parameters
Type | Name | Description |
---|---|---|
Guid | a | The first guid. |
Guid | b | The seconds guid. |
Returns
Type | Description |
---|---|
Guid |
ToBase32String(Guid, Int32)
Converts a Guid into a base-32 string.
Declaration
public static string ToBase32String(Guid guid, int length = 26)
Parameters
Type | Name | Description |
---|---|---|
Guid | guid | A Guid. |
System.Int32 | length | The string length. |
Returns
Type | Description |
---|---|
System.String | A base-32 encoded string. |
Remarks
A base-32 string representation of a Guid is the shortest, efficient, representation that is case insensitive (base-64 is case sensitive).
Length must be 1-26, anything else becomes 26.