开发者

Querying from a collection of type ObservableCollection<Dictionary<string, object>>

I have a Collection of type ObservableCollection<Dictionary<string, object>> and one of its properties is 'Group'. How do I write a linq to query all items where "Group == 'SomeGroup'"? I want a list that I can bind to a silverlight grid.开发者_开发技巧


Could you may be post some of the code that you used? Without it this is what comes to mind:

var a = (from m in collection
               from b in m.Values
               where b.Group == "Some Group"
               select b).ToList();

Hope it helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜