UniqueId Class

UniqueId Class

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Represents a unique identifier optimized for GUIDs.

System::Object
  System.Xml::UniqueId

Namespace:  System.Xml
Assembly:  System.Runtime.Serialization (in System.Runtime.Serialization.dll)

No code example is currently available or this language may not be supported.

The UniqueId type exposes the following members.

  NameDescription
Public methodUniqueId()Creates a new instance of the UniqueId class with a new, unique GUID.
Public methodUniqueId(array<Byte>)Creates a new instance of the UniqueId class using a byte array that represents a Guid.
Public methodUniqueId(Guid)Creates a new instance of the UniqueId class using a Guid.
Public methodUniqueId(String)Creates a new instance of the UniqueId class using a string.
Public methodUniqueId(array<Byte>, Int32)Creates a new instance of the UniqueId class that starts from an offset within a byte array that represents a Guid.
Public methodUniqueId(array<Char>, Int32, Int32)Creates a new instance of this class starting from an offset within a char using a specified number of entries.
Top

  NameDescription
Public propertyCharArrayLengthGets a value that indicates the length of the string representation of the UniqueId.
Public propertyIsGuidGets a value that indicates whether the UniqueId is a Guid.
Top

  NameDescription
Public methodEqualsTests whether an object equals this UniqueId. (Overrides Object::Equals(Object).)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeCreates a hash-code representation of this UniqueId. (Overrides Object::GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToCharArrayPuts the UniqueId value into a char array.
Public methodToStringDisplays the UniqueId value in string format. (Overrides Object::ToString().)
Public methodTryGetGuid(Guid%)Tries to get the value of the UniqueId as a Guid.
Public methodTryGetGuid(array<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.
Top

  NameDescription
Public operatorStatic memberEqualityOverrides the equality operator to test for equality of two UniqueId objects.
Public operatorStatic memberInequalityOverrides the equality operator to test for inequality of two UniqueIds.
Top

This class can hold any string value, but is optimized for working with Guids.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Show:
© 2017 Microsoft