C# Guid Guid(Int32, Int16, Int16, Byte[])
Description
Guid Guid(Int32, Int16, Int16, Byte[])
initializes
a new instance of the Guid structure by using the specified integers and byte
array.
Syntax
Guid.Guid(Int32, Int16, Int16, Byte[])
has the following syntax.
public Guid(/*from ww w. j a v a2 s. c o m*/
int a,
short b,
short c,
byte[] d
)
Parameters
Guid.Guid(Int32, Int16, Int16, Byte[])
has the following 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.
Example
The following code shows how to use
Guid.Guid(Int32, Int16, Int16, Byte[])
constructor.
//from w ww.j a va2 s .c o m
using System;
public class MainClass{
public static void Main(String[] argv){
System.Console.WriteLine(new Guid(1,2,3,new byte[]{0,1,2,3,4,5,6,7}) );
}
}
The code above generates the following result.