How to use Guids in C#?

后端 未结 5 1590
名媛妹妹
名媛妹妹 2021-01-30 19:38

This Code:

Something = new Guid() 

is returning:

00000000-0000-0000-0000-000000000000

all the time

5条回答
  •  抹茶落季
    2021-01-30 20:04

     Guid g1 = Guid.NewGuid();
    
     string s1;
     s1 = g1.ToString();
     Console.WriteLine("{0}",s1);
     Console.ReadKey();
    

提交回复
热议问题