471,605 Members | 1,463 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

Iterating Across All Data in Configuration File

Hello,

Using ConfigurationSettings.AppSettings.keys I can iterate across the
default AppSettings section of the XML config file.

I need to iterate across all key value pairs in other sections as well.
If I use:

ConfigurationSettings.GetConfig("path..") as Hashtable;

it doesn't seem to work. Is there any way to do this?

Dec 20 '05 #1
2 1430
You could open the file using an XmlReader. It is designed to iterate
over an XML document.
Dec 21 '05 #2
I found a solution, thanks all for help. It only took me 3 hrs...

In <configSection> specify your type as
"System.Configuration.DictionarySectionHandler ". Then
ConfigurationSettings.GetConfig(type) will return a hash.

Dec 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Antony Sequeira | last post: by
1 post views Thread by Jonathan Hayward | last post: by
12 posts views Thread by Matthew Wilson | last post: by
7 posts views Thread by Dave Hansen | last post: by
2 posts views Thread by Mervin Williams | last post: by
13 posts views Thread by Eric Renken | last post: by
5 posts views Thread by =?Utf-8?B?VGhlIE1hbiBGcm9tIFNRTA==?= | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.