UniqueId Class

A unique identifier optimized for Guids.

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

public ref class UniqueId

The UniqueId type exposes the following members.

  NameDescription
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsUniqueId()Creates a new instance of this class with a new, unique Guid.
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsUniqueId(array<Byte>)Creates a new instance of this class using a byte array that represents a Guid.
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsUniqueId(Guid)Creates a new instance of this class using a Guid.
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsUniqueId(String)Creates a new instance of this class using a string.
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsUniqueId(array<Byte>, Int32)Creates a new instance of this class starting from an offset within a byte array that represents a Guid.
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsUniqueId(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 propertySupported by Portable Class LibrarySupported in .NET for Windows Store appsCharArrayLengthGets the length of the string representation of the UniqueId.
Public propertySupported by Portable Class LibrarySupported in .NET for Windows Store appsIsGuidIndicates whether the UniqueId is a Guid.
Top

  NameDescription
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsEqualsTests whether an object equals this UniqueId. (Overrides Object::Equals(Object).)
Protected methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsGetHashCodeCreates a hash-code representation of this UniqueId. (Overrides Object::GetHashCode().)
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsToCharArrayPuts the UniqueId value into a char array.
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsToStringDisplays the UniqueId value in string format. (Overrides Object::ToString().)
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsTryGetGuid(Guid%)Tries to get the value of the UniqueId as a Guid.
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsTryGetGuid(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 offest.
Top

  NameDescription
Public operatorStatic memberSupported by Portable Class LibrarySupported in .NET for Windows Store appsEqualityOverrides the equality operator to test for equality of two UniqueIds.
Public operatorStatic memberSupported by Portable Class LibrarySupported in .NET for Windows Store appsInequalityOverrides the equality operator to test for inequality of two UniqueIds.
Top

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

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

.NET for Windows Store apps

Supported in: Windows 8

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone 8, Silverlight 8.1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft