Complex app settings in 2.0

  • Thread starter Thread starter Ivan Berg
  • Start date Start date
I

Ivan Berg

Hey everyone, hopefully this will have a simple answer. Using VS2005/.NET
2.0 Application settings.

I have simple settings working fine, but I am trying to store more complex
types now.

For example a collection of city/state/country's

e.g.

los angeles, california, usa
boston, massachusets, usa
......

I would like store it in a xml format rather than CSV

i.e. in collection, get cities.city, cities.state, cities.country or similar

Is this easy or possible to do with the scope of 2.0 App settings? Which
type should be used (I tried xmldocument but it didn't like it)? Can data be
grabbed from an external xml file?

Or is this not a good idea in general for complex settings, and should the
be kept in a seperate xml file that's different that app settings?

Thanks, Ivan
 
I would like store it in a xml format rather than CSV

Beyond a certain point, the key/value pair structre of an application config
file just doesn't cut it any more.

Fortunatly writing a custom configuration section is breeze, and will do
exactly what you want. Check out:
http://msdn2.microsoft.com/en-us/library/2tw134k3.aspx

Everything there applies to all config files, not just Asp.Net configuration
files.
 
Appreciate the replys Kevin and Chris. I will take a look at the links.

Ivan
 

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