It is in vb.net that execute this code:
Dim myDict As New Dictionary(Of String, String) myDict.Add("one", 1) myDict.Add("four", 4) myDict.Add("two", 2) myDict.Add("three", 3) Dim sortedDict = (From entry In myDict Order By entry.Value Ascending).ToDictionary(Function(pair) pair.Key, Function(pair) pair.Value) For Each entry As KeyValuePair(Of String, String) In sortedDict Console.WriteLine(String.Format("{0,10} {1,10}", entry.Key, entry.Value)) Next
apros source share