2

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?

4
  • 1
    Define "value of an inner Dictionary". Commented Oct 5, 2009 at 15:40
  • 1
    I believe he wants it alphabetically, based on the value of the Dictionary<string, string> Commented Oct 5, 2009 at 15:42
  • What does it mean to sort a Hash table? Commented Oct 5, 2009 at 15:44
  • Please give more information about what you want. Dictionaries aren't usually inherently sorted. What do you mean by "the value of the inner dictionary value" in the first place? An example of the data involved would be useful too. Commented Oct 5, 2009 at 15:44

1 Answer 1

2

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 }; 
Sign up to request clarification or add additional context in comments.

1 Comment

psychic debugging in action ;-p

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.