Custom Object User, which sorts the List <User> set by age. [Csharp] public class User {public User (int age, string name) {Age = age; Name = name;} public int Age {get; set ;} public string Name {get; set ;}} here we need a custom comparator [csharp] public static int CompareByAge (User x, User y) // from large to small sorters {if (x = null) {if (y = null) {return 0 ;}return 1 ;}if (y = null) {return-1;} int retval = y. age. compareTo (x. age); return retval;} then you can use List <T>. sort (CompareByAge) to sort [csharp] List <User> list = new List <User> {new User (14, "aa"), new User (17, "bb"), new User (12, "cc"), new User (33, "dd")}; www.2cto.com foreach (var item in list) {Console. writeLine (item. name + ":" + item. age);} Console. writeLine ("sorted"); list. sort (CompareByAge); foreach (var item in list) {Console. writeLine (item. name + ":" + item. age);} Console. readKey ();