【发布时间】:2015-08-19 22:46:40
【问题描述】:
我有一个要放入字典的 linq 查询。我的字典是
Dictionary<string, List<string>>
如何将下面的查询放入定义的字典中?
...
...
select new
{
b.PropertyName
a.PropertyValue,
a.PropertyOrder,
}).Distinct().ToDictionary(x => x.PropertyName,
x => x.ToList() // The rest of the two values should be in the list
);
【问题讨论】:
-
看看这个也许这可以阐明一些想法stackoverflow.com/questions/18640141/…