摘要: string path = Application.StartupPath + "\\" + "timeLenth.txt"; FileStream fs1 = new FileStream(path, FileMode.Create, FileAccess.Write);//搜索创建写入文件 StreamWriter sw = new StreamWriter(fs1); sw.Write("Content no other line"); sw.Write(" ... 阅读全文
posted @ 2014-03-13 16:49 二哥(阿伟) 阅读(2373) 评论(0) 推荐(0) 编辑
摘要: 如T为 classstudent(){ string name; int age;}按age大小排序写法一:students.Sort((student1,student2)=>student1.age-student2.age);写法二:void SortStudents(List students) { students.Sort(Comparison); } private int Comparison(student student1, student student2) { return student1.age - student2.age; } 阅读全文
posted @ 2014-03-13 09:40 二哥(阿伟) 阅读(2596) 评论(0) 推荐(0) 编辑