LINQ query to return a Dictionary

前端 未结 2 1130
Happy的楠姐
Happy的楠姐 2020-11-30 19:08

I have a collection of MyClass that I\'d like to query using LINQ to get distinct values, and get back a Dictionary as the result, but I can\'t figure out

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-30 19:32

    Look at the ToLookup and/or ToDictionary extension methods.

提交回复
热议问题