List<SomeClass>() a;List<SomeClass> b = a.OrderBy(x => x.x).ThenBy(x => x.y).ToList();
public class Employee : IComparable<Employee>{ private int id; private string EmpName; private Int Age; public static Comparison<Employee> AgeComparison = delegate(Employee e1, Employee e2) { return e1.Age.CompareTo(e2.Age); }; public static Comparison<Employee> IDComparison = delegate(Employee e1, Employee e2) { return e1.id.CompareTo(e2.id); }; public int EmployeeID { get { return id; } set { id = value; } } public string EmployeeName { get { return EmpName; } set { EmpName = value; } } public Int UnitAge { get { return Age; } set { Age = value; } } public Employee(int id, string EmpName, Int Age) { this.id = id; this.EmpName = EmpName; this.Age = Age; } public int CompareTo(Employee other) { return EmployeeName.CompareTo(other.EmployeeName); } public override string ToString() { return string.Format("Id: {0} Name: {1} Age: {2}", id, EmpName, Age); }}