生成一个GUID码,是全世界独一无二的码
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _GUID { class Program { static void Main(string[] args) { Console.WriteLine(Guid.NewGuid().ToString()); Console.WriteLine(Guid.NewGuid().ToString()); Console.WriteLine(Guid.NewGuid().ToString()); Console.WriteLine(Guid.NewGuid().ToString()); Console.WriteLine(Guid.NewGuid().ToString()); Console.ReadKey(); } } }