The List<T> class has a Sort method that can be used to sort data. One overload is accepted by the Comparison delegate, which can be implemented through an anonymous function. for example
gridMessages.Sort((x, y) => x.Age.CompareTo(y.Age));
Jaredpar
source share