469,898 Members | 2,305 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

appSetting "sub-settings"

Hi all,

I'm looking for suggestions on storing classifications of application
settings in a WinForms app. I've got a couple ideas using XML config files.
One is to have a set of .config files for each classification. For example,
I might have a Documents.config that adds key/values for
application-servicing files.

The other idea, is just an idea. Is it possible to have sub-tags inside
configuration files and still access through the AppSettings collection or
GetConfig method?

Something like

<appSettings>
<CommonFiles>
<add key="AddressLabel" value="MyLabel.doc">
</CommonFiles>
</appSettings>

Is there another, better way to store application-wide settings that would
be better for moderately frequently accessed settings?

TIA,

John
Nov 22 '05 #1
2 1702
You can create custom sections in a config file. To get you started, you
can read about the IConfigurationSectionHandler.
"John Spiegel" <js******@YETANOTHERSPAMHATERc-comld.com> wrote in message
news:OI**************@tk2msftngp13.phx.gbl...
Hi all,

I'm looking for suggestions on storing classifications of application
settings in a WinForms app. I've got a couple ideas using XML config files. One is to have a set of .config files for each classification. For example, I might have a Documents.config that adds key/values for
application-servicing files.

The other idea, is just an idea. Is it possible to have sub-tags inside
configuration files and still access through the AppSettings collection or
GetConfig method?

Something like

<appSettings>
<CommonFiles>
<add key="AddressLabel" value="MyLabel.doc">
</CommonFiles>
</appSettings>

Is there another, better way to store application-wide settings that would
be better for moderately frequently accessed settings?

TIA,

John

Nov 22 '05 #2
Looks good! Thanks, Peter.

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:eh**************@TK2MSFTNGP14.phx.gbl...
You can create custom sections in a config file. To get you started, you
can read about the IConfigurationSectionHandler.
"John Spiegel" <js******@YETANOTHERSPAMHATERc-comld.com> wrote in message
news:OI**************@tk2msftngp13.phx.gbl...
Hi all,

I'm looking for suggestions on storing classifications of application
settings in a WinForms app. I've got a couple ideas using XML config

files.
One is to have a set of .config files for each classification. For

example,
I might have a Documents.config that adds key/values for
application-servicing files.

The other idea, is just an idea. Is it possible to have sub-tags inside
configuration files and still access through the AppSettings collection or GetConfig method?

Something like

<appSettings>
<CommonFiles>
<add key="AddressLabel" value="MyLabel.doc">
</CommonFiles>
</appSettings>

Is there another, better way to store application-wide settings that would be better for moderately frequently accessed settings?

TIA,

John


Nov 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Phil Powell | last post: by
7 posts views Thread by Brett | last post: by
2 posts views Thread by Yannick Turgeon | last post: by
2 posts views Thread by jvvhie | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.