0 out of 1 rated this helpful - Rate this topic

UniqueId Class

A unique identifier optimized for Guids.

System.Object
  System.Xml.UniqueId

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

The UniqueId type exposes the following members.

  Name Description
Public method Supported by Portable Class Library UniqueId() Creates a new instance of this class with a new, unique Guid.
Public method Supported by Portable Class Library UniqueId(Byte[]) Creates a new instance of this class using a byte array that represents a Guid.
Public method Supported by Portable Class Library UniqueId(Guid) Creates a new instance of this class using a Guid.
Public method Supported by Portable Class Library UniqueId(String) Creates a new instance of this class using a string.
Public method Supported by Portable Class Library UniqueId(Byte[], Int32) Creates a new instance of this class starting from an offset within a byte array that represents a Guid.
Public method Supported by Portable Class Library UniqueId(Char[], Int32, Int32) Creates a new instance of this class starting from an offset within a char using a specified number of entries.
Top
  Name Description
Public property Supported by Portable Class Library CharArrayLength Gets the length of the string representation of the UniqueId.
Public property Supported by Portable Class Library IsGuid Indicates whether the UniqueId is a Guid.
Top
  Name Description
Public method Supported by Portable Class Library Equals Tests whether an object equals this UniqueId. (Overrides Object.Equals(Object).)
Protected method Supported by Portable Class Library Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Supported by Portable Class Library GetHashCode Creates a hash-code representation of this UniqueId. (Overrides Object.GetHashCode().)
Public method Supported by Portable Class Library GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method Supported by Portable Class Library MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Supported by Portable Class Library ToCharArray Puts the UniqueId value into a char array.
Public method Supported by Portable Class Library ToString Displays the UniqueId value in string format. (Overrides Object.ToString().)
Public method Supported by Portable Class Library TryGetGuid(Guid) Tries to get the value of the UniqueId as a Guid.
Public method Supported by Portable Class Library 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 offest.
Top
  Name Description
Public operator Static member Supported by Portable Class Library Equality Overrides the equality operator to test for equality of two UniqueIds.
Public operator Static member Supported by Portable Class Library Inequality Overrides 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, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
The UniqueId is a classic
This Community Content can be deleted