I have a method returning a List, let\'s call it GetSomeStrings().
GetSomeStrings()
I have an extension method on string class, returning number of characters in the str
A regular Dictonary is not sorted, but you can use a SortedDictonary:
var sortedDict = new SortedDictionary( GetSomeStrings().ToDictionary(x => x, y => y.Number('A')));
That statement should give you a SortedDictionary sorted by the string key.