public class Item
{
public double findMe{ get; set; }
public int? iMayBeNull { get; set; }
}
public Dictionary<int, ICollection<Item>> TheDictionary{ get; set; }
...
TheDictionary dict = new Dictionary<int, ICollection<Item>>();
I’m trying to find the minimum value of “findMe” where “iMayBeNull” is null in all of “dict”‘s collections.
I can’t seem to wrap my head around this one.
Any guidance would be greatly appreciated.
Use
.SelectManyto coalesce all the collections into one big sequence, then just use the standard.Whereand.Minoperators: