tags:

views:

299

answers:

1

I can't seem to wrap my head around this one. I need to sort a Dictionary by the value of an inner Dictionary using LINQ. Any thoughts?

+2  A: 

Do you mean you want all values, sorted by the inner value?

from outerPair in outer
from innerPair in outerPair.Value
orderby innerPair.Value
select new {
    OuterKey = outerPair.Key,
    InnerKey = innerPair.Key,
    Value = innerPair.Value
};
Marc Gravell
YES!!!! Thank you!!!!!
DDiVita
psychic debugging in action ;-p
Marc Gravell