Selecting a value from multiple dictionaries inside an enumeration
- by johaanfaust
If I have an enumeration of dictionaries
IEnumerable<IDictionary<string, float>> enumeration
can I perform a Linq query on it so that I can select by a value from each dictionary in the enumeration using the same key?
I can do this in a loop:
float f;
foreach (var dictionary in enumeration)
{
if (dictionary.TryGetValue("some…