更新时间:2021-08-10 01:12:48
试试这个:
var matches = dict.Values.Where(rec => rec.Name == "foo").ToList();
要知道,这基本上将创建一个从原始值集合一个新的列表,所以你的字典中的任何更改将不会自动在你的绑定控件的体现。
Be aware that that will essentially be creating a new list from the original Values collection, and so any changes to your dictionary won't automatically be reflected in your bound control.