Configuration / Collection problem

  • Thread starter Thread starter Rab
  • Start date Start date
R

Rab

Hi everyone

I`m having a problem extracting some values from an app.config file.
I`m storing a collection of name value pairs in the config file, and
retreiving them using a custom handler that implements
IConfigurationSectionHandler. It works fine, except my data is such
that I need to be able to retrieve it in the same order that it is
stored, and some of the pairs have the same names. Obviously a
Hashtable cant handle this, so I need find an object which can accept
these values for use in the app.

Any ideas?

Many thanks
 
Rab,
Rather then use a HashTable, have you considered using a
System.Collections.Specialized.NameValueCollection?

Or deriving your own from
System.Collections.Specialized.NameObjectCollectionBase?

Hope this helps
Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top