This documentation is archived and is not being maintained.

Guid Constructor (Int32, Int16, Int16, Byte[])

.NET Framework 1.1

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

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

Parameters

a
The first 4 bytes of the GUID.
b
The next 2 bytes of the GUID.
c
The next 2 bytes of the GUID.
d
The remaining 8 bytes of the GUID.

Exceptions

Exception Type Condition
ArgumentNullException d is a null reference (Nothing in Visual Basic).
ArgumentException d is not 8 bytes long.

Example

Guid(1,2,3,new byte[]{0,1,2,3,4,5,6,7}) creates a Guid that corresponds to "00000001-0002-0003-0001-020304050607".

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

Guid Structure | Guid Members | System Namespace | Guid Constructor Overload List

Show: