Прочетете на английски Редактиране

Споделяне чрез


UniqueId Class

Definition

A unique identifier optimized for Guids.

C#
public class UniqueId
Inheritance
UniqueId

Remarks

This class can hold any string value, but has optimizations for dealing with Guids.

Constructors

UniqueId()

Creates a new instance of this class with a new, unique Guid.

UniqueId(Byte[], Int32)

Creates a new instance of this class starting from an offset within a byte array that represents a Guid.

UniqueId(Byte[])

Creates a new instance of this class using a byte array that represents a Guid.

UniqueId(Char[], Int32, Int32)

Creates a new instance of this class starting from an offset within a char using a specified number of entries.

UniqueId(Guid)

Creates a new instance of this class using a Guid.

UniqueId(String)

Creates a new instance of this class using a string.

Properties

CharArrayLength

Gets the length of the string representation of the UniqueId.

IsGuid

Indicates whether the UniqueId is a Guid.

Methods

Equals(Object)

Tests whether an object equals this UniqueId.

GetHashCode()

Creates a hash-code representation of this UniqueId.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToCharArray(Char[], Int32)

Puts the UniqueId value into a char array.

ToString()

Displays the UniqueId value in string format.

TryGetGuid(Byte[], Int32)

Tries to get the value of the UniqueId as a Guid and store it in the given byte array at the specified offset.

TryGetGuid(Guid)

Tries to get the value of the UniqueId as a Guid.

Operators

Equality(UniqueId, UniqueId)

Overrides the equality operator to test for equality of two UniqueIds.

Inequality(UniqueId, UniqueId)

Overrides the equality operator to test for inequality of two UniqueIds.

Applies to

Продукт Версии
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0