Wednesday, 25 November 2015

C# create GUID

            Console.WriteLine(@"System.Guid.NewGuid().ToString() = " + System.Guid.NewGuid().ToString());
            Console.WriteLine(@"System.Guid.NewGuid().ToString(""N"") = " + System.Guid.NewGuid().ToString("N"));
            Console.WriteLine(@"System.Guid.NewGuid().ToString(""D"") = " + System.Guid.NewGuid().ToString("D"));
            Console.WriteLine(@"System.Guid.NewGuid().ToString(""B"") = " + System.Guid.NewGuid().ToString("B"));
            Console.WriteLine(@"System.Guid.NewGuid().ToString(""P"") = " + System.Guid.NewGuid().ToString("P"));