This code example demonstrates the Guid.NewGuid() method. : Guid « Development Class « C# / C Sharp






This code example demonstrates the Guid.NewGuid() method.

  

using System;

class Sample 
{
    public static void Main() 
    {
        Guid g;
    // Create and display the value of two GUIDs.
        g = Guid.NewGuid();
        Console.WriteLine(g);
        Console.WriteLine(Guid.NewGuid());
    }
}

   
    
  








Related examples in the same category

1.Create Guid
2.Converts the string representation of a Guid toits Guid equivalent.
3.Parse GUID
4.Convert Guid To Guid Binary String
5.Is valid GUID
6.Use Regular expression to check the Guid