摘要: System.Random rd = new System.Random(); System.Console.Title = "彩色控制台"; while (true) { System.Console.BackgroundColor = (System.ConsoleColor)rd.Next(9, 15); System.Console.ForegroundColor = (System.ConsoleColor)rd.Next(9, 15); System.Console.Clear(); for (int i = 0; i < 100;i++ ) { Syst 阅读全文
posted @ 2013-06-16 13:54 飞越无限 阅读(131) 评论(0) 推荐(0)
摘要: System.Random r = new System.Random(); for(int i=0;i<100;i++) { int j = r.Next(1, 100); System.Console.WriteLine(j); } System.Console.ReadLine(); 阅读全文
posted @ 2013-06-16 13:37 飞越无限 阅读(112) 评论(0) 推荐(0)
摘要: List<string> ls = new List<string>() { "a", "b", "c" }; foreach (string s in ls) { ls.Add("d"); }上面的例子在执行时会出现:"集合已修改,可能无法执行枚举操作。"异常,这一点要多注意 阅读全文
posted @ 2013-06-16 13:07 飞越无限 阅读(201) 评论(0) 推荐(0)