标签:.so list 集合 color add pareto ret style 排序
List<Student> studentList = new List<Student>(); Student s = new Student(); s.Name = "s1"; s.Age = 15; studentList.Add(s); Student s2 = new Student(); s2.Name = "s2"; s2.Age = 10; studentList.Add(s2); Student s3 = new Student(); s3.Name = "s3"; s3.Age = 5; studentList.Add(s3); studentList.Sort((a, b) => a.Age.CompareTo(b.Age));
List集合将以Age从小到大排序
标签:.so list 集合 color add pareto ret style 排序
原文地址:https://www.cnblogs.com/jishugaochao/p/10319281.html