.NET Framework Class Library
Guid Constructor

Initializes a new instance of the Guid class.

Overload List

  NameDescription
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkGuid(array<Byte>[]()[])Initializes a new instance of the Guid class using the specified array of bytes.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkGuid(String)Initializes a new instance of the Guid class using the value represented by the specified string.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkGuid(Int32, Int16, Int16, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte)Initializes a new instance of the Guid class using the specified integers and bytes.
Public methodGuid(UInt32, UInt16, UInt16, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte)Initializes a new instance of the Guid class using the specified unsigned integers and bytes.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkGuid(Int32, Int16, Int16, array<Byte>[]()[])Initializes a new instance of the Guid class using the specified integers and byte array.
Top
See Also

Reference

Tags :


Community Content

Lost_In_JavaScript_Land
6th overload
Within C#, there are actually 6 overloads to the Guid structure.

Guid g = new Guid(); // Creates a GUID structure with {00000000-0000-0000-0000-000000000000} as it's value.

Running the above code in C# will not throw an error, compiles perfectly, and the overload is defined within intellisense. This can cause confusion, especially when you're expecting a truly unique ID to be generated from the constructor. If you run into this, just simply replace "new Guid()" with "Guid.NewGuid()".
Tags :

Page view tracker