My answer would be not to re-invent the wheel; rather than deriving from
CollectionBase, I tend to use encapsulation, i.e. I would have an
instance-field which holds either a Dictionary<stri ng,string> (2.0 onwards)
or a NameValueCollec tion, which I would then expose through whichever
interfaces and indexers I choose.
If you really want to inherit, neither of these is sealed - but I'd struggle
to see much of a reason (without more info). You might even find that
Dictionary<stri ng,string> or NameValueCollec tion are enough for your needs
without writing your own class.
Any use?
Marc
"myPosts" <tr************ **@yahoo.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
Hi all,
I am having class which is derived from collectionbase class.
I am adding some string elements to this collection.
What i want is to add support of hashing into class which i have
derived from collectionbase.
Because currently i am adding strings to my collection and at a time of
removing it is allowing me to removing only according to index and i
want to add functionality of removing through particular key which
should be unique.
Does any one have any idea about this.
Any help will be truely appreciated.
Thanks in advance.