using System; using System.Collections.Generic; class Program { static void Main(string[] args) { var list = new List>(); list.Add(new KeyValuePair(31, "Jan")); list.Add(new KeyValuePair(28, "Feb")); list.Add(new KeyValuePair(31, "Mar")); list.Add(new KeyValuePair(30, "Apr")); list.Add(new KeyValuePair(31, "Jan")); //list.Sort(delegate(KeyValuePair kvp1, KeyValuePair kvp2) //{ // return kvp2.Key - kvp1.Key; //}); list.Sort((KeyValuePair kvp1, KeyValuePair kvp2) => (kvp2.Key - kvp1.Key)); foreach (var kvp in list) { Console.WriteLine("{0} {1}", kvp.Key, kvp.Value); } } }