how to create guid c# code example
Example 1: generate guid c#
Guid g = Guid.NewGuid();
string guid = Guid.NewGuid().ToString();
Example 2: c# set a guid
// If you already have a string representation of the Guid, you can do this:
Guid g = new Guid("11223344-5566-7788-99AA-BBCCDDEEFF00");
// And if you want a brand new Guid then just do
Guid g = Guid.NewGuid();