I have class called Order in C# .Net 4.0. I want to create a custom collection class that inherits from the List class. I then want to know how to override the sort method on the List class to implement my own sort method.
Thanks!
I have class called Order in C# .Net 4.0. I want to create a custom collection class that inherits from the List class. I then want to know how to override the sort method on the List class to implement my own sort method.
Thanks!
You don't have to, as List<T>.Sort()
has a few overloads that let you specify the way to compare objects, altering the sort results.