Guid guid = new Guid("76d32bdc-a1a9-4f14-aec4-916fde986c11"); string guidString = guid.ToString(); Console.WriteLine(guidString);
Guid guid = Guid.NewGuid(); string guidString = guid.ToString("N"); Console.WriteLine(guidString);In this example, a new Guid object is generated using the Guid.NewGuid method. The ToString method is then used with the "N" format specifier to get a string representation of the Guid object without dashes. The string representation is then printed to the console. This method is a part of the System namespace in C#, which is included in the .NET Framework Class Library.