>does anybody have an idea why the List<T>.Sort method is not virtual?
The List class isn't designed to be derived from. Instead the
designers prioritized performance and made methods non-virtual.
Mattias

Signature
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Ben Voigt [C++ MVP] - 01 Nov 2007 16:37 GMT
> >does anybody have an idea why the List<T>.Sort method is not virtual?
>
> The List class isn't designed to be derived from. Instead the
> designers prioritized performance and made methods non-virtual.
Also, the IList interface doesn't include the Sort method, neither does List
implement any ISortableContainer interface. That seems like a serious
omission.
> Mattias