I've been looking around at how to implement a descending sort for a generic list of strings (List
). After looking at several options of implementing IComparable, converters, and all sorts of other madness, it turns out the List object has a very easy way of doing this. So easy, in fact, that I'm sort of embarrassed I didn't just know it. In case there is anyone else who is in need of this simple solution, here is a short example.
List myList = new List();
myList.Add("AAAA");
myList.Add("ZZZZ");
myList.Add("MMMM");
myList.Sort();
myList.Reverse();
Painfully easy.