Reading values from NameObjectCollectionBase
- From: "\(O\)enone" <oenone@xxxxxxxxxxx>
- Date: Sun, 03 Jun 2007 13:11:09 GMT
I've written some code that reads the names and values from a
Collections.Specialized.NameValueCollection and displays them on the screen.
However, I'd ideally like to change this code so that it runs against the
abstract Collections.Specialized.NameObjectCollectionBase class, so that all
collections that derive from this base class (which includes
NameValueCollection) will work with my code.
I can extract the keys that have been used to add items to the collections
using the Keys() property which is implemented in the base class, but there
is no similar method to extract the values that are associated with the
keys. As the class appears by definition to hold matching pairs of names
(keys) and values, I would have thought there would be a way to obtain the
values themselves.
Can anyone shed any light on this?
Thanks in advance,
--
(O)enone
.
- Follow-Ups:
- Re: Reading values from NameObjectCollectionBase
- From: Lloyd Sheen
- Re: Reading values from NameObjectCollectionBase
- Prev by Date: DatagirdView in VB.net
- Next by Date: Custom Button Control
- Previous by thread: DatagirdView in VB.net
- Next by thread: Re: Reading values from NameObjectCollectionBase
- Index(es):