var simpleList = new List<ObjectName>();
// Order by a property
list.OrderBy(o => o.PropertyName);
// Order by multiple property
list.OrderBy(o => o.PropertyName).ThenBy(o => o.AnotherProperty);
// Same but descending
list.OrderByDescending(o => o.PropertyName).ThenByDescending(o => o.AnotherProperty);
var users = new List<User>();
users.Add(new User("John", "Doe", 1230));
users.Add(new User("Lucy", "Novak", 670));
users.Add(new User("Ben", "Walter", 2050));
users.Add(new User("Robin", "Brown", 2300));
users.Add(new User("Amy", "Doe", 1250));
users.Add(new User("Joe", "Draker", 1190));
users.Add(new User("Janet", "Doe", 980));
users.Add(new User("Albert", "Novak", 1930));
users.Sort((u1, u2) =>
{
int result = u1.LastName.CompareTo(u2.LastName);
return result == 0 ? u1.Salary.CompareTo(u2.Salary) : result;
});