How to sort class list by integer property?
This question already has an answer here:
尝试这个:
List<Person> SortedList = people.OrderBy(o=>o.Age).ToList();
people.Sort((p1, p2) =>
{
return p1.Age - p2.Age;
});
链接地址: http://www.djcxy.com/p/70934.html
上一篇: 如何按.NET 2.0中的特定属性对列表进行排序?
下一篇: 如何通过整数属性对类列表进行排序?