I often have to sort a dictionary, consisting of keys & values, by value. For example, I have a hash of words and respective frequencies, that I want to order by frequen
Sort and print:
var items = from pair in players_Dic orderby pair.Value descending select pair; // Display results. foreach (KeyValuePair pair in items) { Debug.Log(pair.Key + " - " + pair.Value); }
Change descending to acending to change sort order