Mark <(E-Mail Removed)> wrote:
> Does anyone know of a way to do multicolumn sorting with the ArrayList
> object?
>
> Basically I have a collection of objects and I want to sort on multiple
> properties of the objects in the collection.
>
> Any guidance here would be great.
Use the version of ArrayList.Sort which takes an IComparer - that way
you can have different IComparers to sort by different columns. You can
also have a "combining" IComparer which is set up to have an ordered
sequence of other ones, to sort by multiple columns at the same time,
as it were.
--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too