Click to See Complete Forum and Search --> : Sort List of objects


doomsday123
February 24th, 2006, 01:17 PM
Ive got a list full of AdminLink objects that have the attributes "Title" "URL" and "Description". How would I sort the list of objects by their Title? Thanks.

stepi
February 24th, 2006, 01:38 PM
Hi there,
You should implement IComparable overriding int CompareTo(object obj) where you do the comparison based on Title. Then you use the Sort method provided by the ArrayList.