【发布时间】:2012-08-31 09:00:59
【问题描述】:
在 C# 中:
List<List<Point>> SectionList = new List<List<Point>>();
SectionList 包含点列表,其中每个子列表包含的点数量不同。
我想弄清楚的是如何按子列表的数量按降序对 SectionList 进行排序。
因此,如果 SectionList 有 3 个点列表,排序后,SectionList[0] 将包含所有 3 个列表中的最高 Count 值。
谢谢, 神话
【问题讨论】:
-
list.OrderBy(x=>x.Count).ToList(); stackoverflow.com/questions/1976546/…