Re: List's Add and Remove are not virtual. What now?

Peter Obiefuna <[email protected]> Wed, 30 Jan 2008 15:27:09 -0700
Newsgroups gmane.comp.windows.devel.dotnet.clr
Message-ID <[email protected]>
Perhaps, System.Collections.ObjectModel.Collection<T> would solve your
problem. It can take an IList in the overloaded constructor and is readily
overrideable.
Curt suggested wrapping List<T>. That's not a bad idea, except if you may
get some serialization concerns. Last time I tried, I remember a bit vaguely
that I had a problem of that sort.
P

--------------------------------------------------
From: "Brady Kelly" <[email protected]>
Sent: Wednesday, January 30, 2008 3:07 PM
To: <[email protected]>
Subject: [DOTNET-CLR] List's Add and Remove are not virtual.  What now?

> I would have like to override these methods in my class derived of
> List<T>.
> Is there some base list somewhere I could use to the same effect, and why
> shouldn't these be overridden?
>
>
> ===================================
> This list is hosted by DevelopMentor®  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com