摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication6{ class Program { static void Main(string[] args) { Student student = new Student(); student.Name = "会东"; student.Age = 28; Console.WriteLine("姓名:{0} 年龄{1}", student.Nam 阅读全文
posted @ 2013-06-17 23:42 飞越无限 阅读(276) 评论(0) 推荐(0)
摘要: 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 飞越无限 阅读(128) 评论(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 飞越无限 阅读(110) 评论(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 飞越无限 阅读(200) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using MySQLDriverCS;namespace ConsoleApplication2{ class Program { static void Main(string[] args) { //MySQLConnection sc = null; MySQLConnection sc = new MySQLConnection(new MySQLConnectionString( "b", " 阅读全文
posted @ 2013-06-12 17:12 飞越无限 阅读(4320) 评论(0) 推荐(0)