Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Guid Constructor

.NET Framework 1.1

Initializes a new instance of the Guid class.

Overload List

Initializes a new instance of the Guid class using the specified array of bytes.

Supported by the .NET Compact Framework.

[Visual Basic] Public Sub New(Byte())
[C#] public Guid(byte[]);
[C++] public: Guid(unsigned char __gc[]);
[JScript] public function Guid(Byte[]);

Initializes a new instance of the Guid class using the value represented by the specified string.

Supported by the .NET Compact Framework.

[Visual Basic] Public Sub New(String)
[C#] public Guid(string);
[C++] public: Guid(String*);
[JScript] public function Guid(String);

Initializes a new instance of the Guid class using the specified integers and byte array.

Supported by the .NET Compact Framework.

[Visual Basic] Public Sub New(Integer, Short, Short, Byte())
[C#] public Guid(int, short, short, byte[]);
[C++] public: Guid(int, short, short, unsigned char __gc[]);
[JScript] public function Guid(int, Int16, Int16, Byte[]);

Initializes a new instance of the Guid class using the specified integers and bytes.

Supported by the .NET Compact Framework.

[Visual Basic] Public Sub New(Integer, Short, Short, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte)
[C#] public Guid(int, short, short, byte, byte, byte, byte, byte, byte, byte, byte);
[C++] public: Guid(int, short, short, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char);
[JScript] public function Guid(int, Int16, Int16, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte);

Initializes a new instance of the Guid class using the specified unsigned integers and bytes. This constructor is not CLS-compliant.

[Visual Basic] Public Sub New(UInt32, UInt16, UInt16, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte)
[C#] public Guid(uint, ushort, ushort, byte, byte, byte, byte, byte, byte, byte, byte);
[C++] public: Guid(unsigned int, unsigned short, unsigned short, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char);
[JScript] public function Guid(UInt32, UInt16, UInt16, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte);

Example

Guid(0xa,0xb,0xc,0,1,2,3,4,5,6,7) creates a Guid that corresponds to "0000000a-000b-000c-0001-020304050607".

See Also

Guid Structure | Guid Members | System Namespace

Show:
© 2015 Microsoft