So I have this C# list:
List gridMessages = new List();
Each
The List class has a Sort method which can be used to in place sort the data. One overload takes a Comparison delegate that can be implemented via an anonymous function. For example
List
Sort
Comparison
gridMessages.Sort((x, y) => x.Age.CompareTo(y.Age));