An immutable class that represents GUID values. This class can be constructed from either a String or a byte array.


The following tables list the members exposed by Id.

Public Constructors

  Name Description
Static Public method Id Overloaded.  
Top

Public Fields

  Name Description
Public field Static ZERO_ID Convenience constant for the all zero GUID. This field is read-only.
Top

Public Methods

  Name Description
Public method CompareTo Compares two IDs. This method returns -1 if this is less than arg, 1 if this is greater than arg, and 0 if the IDs are equal.

This comparison is consistent with how IDs are compared in the DB2 and Oracle databases, but does not match how MSSQL Server compares IDs. For MSSQL Server databases, use CompareTo(arg, dbType).

Public method Static CreateId Generates an ID with an IETF Version 4 UUID value. This value is based on the Internet Engineering Task Force (IETF) UUID specification using the runtime System.Guid.NewGuid() method.
Public method Equals Overloaded. Compares two IDs for logical equality.
Public method GetBytes Returns a copy of this ID as an array of bytes.
Public method GetHashCode Overridden. Returns the hashcode for this ID.
Public method GetObjectData This method is exposed to satisfy the ISerializable interface.
Public method GetType Gets the Type of the current instance. (inherited from Object)
Public method Static IsId Determines if a String is an ID or not.
Public operator Static op_Equality Determines whether two specified Id objects are the same.
Public operator Static op_Inequality Determines whether two specified Id objects are not the same.
Public method ToString Overridden. Returns the String representation of this ID.
Top

Protected Methods

  Name Description
Family method Finalize Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Family method MemberwiseClone Creates a shallow copy of the current Object. (inherited from Object)
Top

Explicit Interface Implementations

  Name Description
Static Private method Id Overloaded.  
Top

See Also