Guid.NewGuid().ToString();

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace genGUID
{
    class Program
    {
        static void Main(string[] args)
        {
            String Y = "y";
            while (Y=="y")
            {
                string guid = Guid.NewGuid().ToString();
                string state = guid.Replace("-", "");
                Console.WriteLine("{0},{1}", guid, state);
                Console.WriteLine("Input y to continue,otherwise exit!");
                Y = Console.ReadLine();
            }

        }
    }
}



你可能感兴趣的:(.NET,C#)