How to Create a Guid Value in C# ?


This content was proof-read by Grammarly. You can Try Grammary for FREE

If you want to create a new Guid value in C# which is random , you can use the Guid class to achieve it.

Below is a sample code snippet demonstrating how to do it.

How to Create a Guid Value in C# ?

using System;

namespace ACCode
{
    class Program
    {
        static void Main(string[] args)
        {
            Guid guid = Guid.NewGuid();
            Console.ReadLine();
        }
        
    }
  
}
%d bloggers like this: