【发布时间】:2017-01-09 08:42:41
【问题描述】:
我正在尝试连接 List<> 如下-
List<Student> finalList = new List<Student>();
var sortedDict = dictOfList.OrderBy(k => k.Key);
foreach (KeyValuePair<int, List<Student>> entry in sortedDict) {
List<Student> ListFromDict = (List<Student>)entry.Value;
finalList.Concat(ListFromDict);
}
但是没有发生串联。 finalList 保持为空。有什么帮助吗?
【问题讨论】:
标签: c# dictionary concatenation generic-list