大家好,
我有一个清单<string>包含我要从列表中选择的键的列表<Dictionary<string, object>>() 我怎样才能做到这一点?
我有一个清单<string>包含我要从列表中选择的键的列表<Dictionary<string, object>>() 我怎样才能做到这一点?
Example:
var fields = new List<string>();
fields.Add("CustomerID");
fields.Add("Location");
var dictionary = new List<Dictionary<string, object>>();
//How can I get from the dictionary only the key value pairs
//where the key 串 is in the fields list?