I have a List of messages. Each message has a type.
public enum MessageType { Foo = 0, Bar = 1, Boo = 2, Doo = 3 }
The enum
You may avoid writing a completely new type just to implement IComparable. Use the Comparer class instead:
IComparer comparer = Comparer.Create((message) => { // lambda that compares things }); tempList.Sort(comparer);