Is there a way to require multiple keys for the .ToLookup function provided by LINQ?
.ToLookup
I will admit that this seems non-intuitive at first, and I\'m expecting
I would use Tuples for this sort of thing:
Tuple
var lookup = set.ToLookup(x => Tuple.Create(x.StringProp, x.IntProp)); MyClass c = lookup[Tuple.Create("a", 1)].First(); IEnumerable list = lookup[Tuple.Create("c", 4)];