Re: Derive concrete type from generic type.

"Nassar, Anthony" <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.clr
Message-ID <[email protected]>
Whether it's wrong or right, I believe that it's discouraged, in the
same way that STL containers are not intended to be derived from. I
thought there was a CollectionBase<_>...no, there isn't. Well, that
stinks! When I've wanted a custom list, I've implemented IList<_> and
used a List<> under the covers. You might want to look into the C5
collections library, which has much better support for custom
collections. 

-----Original Message-----
From: Discussion of development on the .NET platform using any managed
language [mailto:[email protected]] On Behalf Of Daniel
Petersson
Sent: Tuesday, January 22, 2008 6:57 AM
To: [email protected]
Subject: Re: [DOTNET-CLR] Derive concrete type from generic type.

Frans is essentially right BUT... =)

Some of us argue that inheriting classes such as List<T> to create new
types is a bad thing.
This discussion is more common in the JAVA community. Prior to
completing your impl. I recomend that you read  this java article about
inheritence VS interface implementation.

http://www.javaworld.com/javaworld/jw-08-2003/jw-0801-toolbox.html

Regards,

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

View archives and manage your subscription(s) at http://discuss.develop.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.