using System; namespace ConsoleTest { class Program { static void Main(string[] args) { Console.WriteLine("Hello World!"); string t = DateTime.Now.Ticks.ToString(); t = CdkeyHelper.DESEncrypt(t, CdkeyHelper.DesKeyStr); string[] strid = new string[t.Length];// for (int i = 0; i < t.Length; i++)//把字符赋给数组 { strid[i] = t.Substring(i, 1); } string s = ""; Random rdid = new Random(); for (int i = 0; i < 25; i++)//从数组随机抽取字符组成新的字符生成机器三 { s += strid[rdid.Next(0, strid.Length)]; } Console.WriteLine(s); } } }