Re: multiple same section in app.config
- From: Droopy <droopytoonnospam@xxxxxxxxxxx>
- Date: 15 Sep 2006 06:56:18 GMT
That is a good idea but I don't really like it.
The parsing seems a bit too complicated.
I am going to try my own custom handler.
Thanks.
"Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote
in news:eJJHISB2GHA.4116@xxxxxxxxxxxxxxxxxxxx:
Droopy,
The reason this doesn't work is that you are trying to create
something
of a heiarchical nature for data that is simply a set of pairs.
If you want to use the NameValueSectionHandler, then you need to
do
something like this:
<Connections>
<add key="ComPort_1" value="COM2" />
<add key="Name_1" value="Connection 1" />
<add key="ComPort_2" value="COM4" />
<add key="Name_2" value="Connection 2" />
</Connections>
Then, you would have to parse the names to see how the values are
grouped together.
If you want to have a different kind of config setup, then you
will have
to create your own custom handler.
Hope this helps.
.
- Follow-Ups:
- Re: multiple same section in app.config
- From: Droopy
- Re: multiple same section in app.config
- References:
- multiple same section in app.config
- From: Droopy
- Re: multiple same section in app.config
- From: Nicholas Paldino [.NET/C# MVP]
- multiple same section in app.config
- Prev by Date: Re: multiple same section in app.config
- Next by Date: Grid refresh problem
- Previous by thread: Re: multiple same section in app.config
- Next by thread: Re: multiple same section in app.config
- Index(es):