产生一个不会重复的编号

    1. using System;
    2. namespace _096_GUID
    3. {
    4. class Program
    5. {
    6. static void Main(string[] args)
    7. {
    8. //产生一个不会重复的编号
    9. //Guid.NewGuid();
    10. Console.WriteLine(Guid.NewGuid().ToString());
    11. Console.WriteLine(Guid.NewGuid().ToString());
    12. Console.WriteLine(Guid.NewGuid().ToString());
    13. Console.WriteLine(Guid.NewGuid().ToString());
    14. Console.WriteLine(Guid.NewGuid().ToString());
    15. Console.ReadKey();
    16. }
    17. }
    18. }

    96071b6e-8082-4db8-a6f0-2fb913ca2123
    8a1a0aba-dd0f-4a2c-b5cf-a8162c105360
    59cb39af-726e-4edf-b777-535f49eebfa6
    560c048c-2b81-49ea-aeaa-1c3d6647eb7a
    5223dc9f-3961-44e1-9cbd-d5977943ea44