摘要:
举个例子,依然拿我之前那篇用过的学生(简化) public class Student { private int id; public int ID { get { return id; } set { id = value; } } } 其他前提 Student student = new St 阅读全文
摘要:
一个简单类 //学生 public class Student { private int id;//id private string name;//姓名 private int student_//学号 public int ID { get { return id; } set { id = 阅读全文
摘要:
1、使用Sort() 当T是简单类型,int,double之类的可以直接用 var a = new List<int>(); a.Add(1); a.Add(5); a.Add(4); a.Sort();//排序 2、使用LinQ a = a.OrderByDescending(i => i.Nam 阅读全文