C# List集合根据对象某个字段排序
public class Student{public string name;public int num;}ListStudent students=new ListStudent();//假设students集合里面添加了数据ListStudent temp1= students.OrderBy(s = s.num).ToList();//num 小大到ListStudent temp2= students.OrderByDescending(…
public class Student{public string name;public int num;}ListStudent students=new ListStudent();//假设students集合里面添加了数据ListStudent temp1= students.OrderBy(s = s.num).ToList();//num 小大到ListStudent temp2= students.OrderByDescending(…