using System.Collections.Generic;
public static void Main()
List<PostCodeSum> postCodeSumTotals = new List<PostCodeSum>();
postCodeSumTotals.Add(new PostCodeSum(){TotalCost=12,PostCode="1"});
postCodeSumTotals.Add(new PostCodeSum(){TotalCost=122,PostCode="11"});
postCodeSumTotals.Add(new PostCodeSum(){TotalCost=123,PostCode="12"});
postCodeSumTotals.Add(new PostCodeSum(){TotalCost=129,PostCode="13"});
postCodeSumTotals.Add(new PostCodeSum(){TotalCost=124,PostCode="14"});
postCodeSumTotals.Add(new PostCodeSum(){TotalCost=125,PostCode="15"});
postCodeSumTotals.Add(new PostCodeSum(){TotalCost=1255,PostCode="16"});
postCodeSumTotals.Add(new PostCodeSum(){TotalCost=126,PostCode="17"});
var top5 = postCodeSumTotals.OrderByDescending(a => a.TotalCost).Take(5);
foreach(var item in top5)
Console.WriteLine("total: {0} and postcode:{1}",item.TotalCost,item.PostCode);
public decimal TotalCost;