A List<KeyValuePair<string, string>> myList = aDictionary.ToList();
myList.Sort( delegate(KeyValuePair<string, string> firstPair, KeyValuePair<string, string> nextPair) {
return firstPair.Value.CompareTo(nextPair.Value);
}
);
B List<KeyValuePair<string, string>> myList = aDictionary.ToList();
myList.Sort((firstPair,nextPair) => { return firstPair.Value.CompareTo(nextPair.Value); } );
C foreach (KeyValuePair<string,int> item in keywordCounts.OrderBy(key=> key.Value)) {
// do something with item.Key and item.Value
}
D var ordered = dict.OrderBy(x => x.Value);