Guid Structure
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Represents a globally unique identifier (GUID).
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
<SerializableAttribute> _
Public Structure Guid
[SerializableAttribute]
public struct Guid
[SerializableAttribute]
public value class Guid
[<Sealed>]
[<SerializableAttribute>]
type Guid = struct end
JScript supports the use of structures, but not the declaration of new ones.
The Guid type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Guid(array<Byte> [] () [] []) | Initializes a new instance of the Guid structure by using the specified array of bytes. | |
Guid(Int32, Int16, Int16, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte) | Initializes a new instance of the Guid structure by using the specified integers and bytes. | |
Guid(UInt32, UInt16, UInt16, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte) | Initializes a new instance of the Guid structure by using the specified unsigned integers and bytes. |
Top
Methods
Name | Description | |
---|---|---|
CompareTo | Compares this instance to a specified object and returns an indication of their relative values. | |
Equals | Returns a value that indicates whether this instance is equal to a specified object. (Overrides ValueType. . :: . .Equals(Object).) | |
GetHashCode | Returns the hash code for this instance. (Overrides Object. . :: . .GetHashCode() () () ().) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
NewGuid | Initializes a new instance of the Guid structure. | |
ToByteArray | Returns a 16-element byte array that contains the value of this instance. | |
ToString | Returns a string representation of the value of this instance in registry format. (Overrides Object. . :: . .ToString() () () ().) |
Top
Fields
Name | Description | |
---|---|---|
Empty | A read-only instance of the Guid structure whose value is all zeros. |
Top
Remarks
A GUID is a 128-bit integer (16 bytes) that can be used across all computers and networks wherever a unique identifier is required. Such an identifier has a very low probability of being duplicated.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.