using System.Collections.Generic;
public static void Main()
List<Address> addr = new List<Address>
new Address { ID =1, Add = "Abbey Road" },
new Address { ID =2, Add = "Abbey Road" },
new Address { ID =3, Add = "Abbey Road" },
new Address { ID =10, Add = "Abbey Road" },
Console.WriteLine("Id - {0}, Address - {1}", x.ID, x.Add);
public class Address : IComparable<Address>
public int ID { get; set; }
public string Add { get; set; }
public int CompareTo(Address other)
return this.ID.CompareTo(other.ID);