Configuration Section

  • Thread starter Thread starter timor.super
  • Start date Start date
T

timor.super

Hi group,

How can I implement a configuration section that can read such an
app.config

<configuration>
<MySection key="key1" value1="123" value2="234"/>
<MySection key="key2" value1="666" value2="99"/>
</configuration>

each thing i'm trying throw an exception if there more than one
MySection

Thanks for your help,

Best,

S.
 
This is a topic for which I I have recently conducted extensive research. I
can tell you that the .NET 2.0 configuration system is not very well
documented by MSDN, and it is far more complex and capable than one might
initially think.

The best documentation I have found is a 3-part article series on
codeProject.com by Jon Rista.
Here is a link to his first article - which might be plenty to get you what
you need:
http://www.codeproject.com/dotnet/mysteriesofconfiguration2.asp

Be sure to read the questions and answers at the bottom of the article - as
some helpful supplementary info is burried there.

Be careful about searching the internet for resources on .NET
configuration - because most of the online documentation, samples, tips, etc
provide .NET 1.x techniques. The configuration system was substantially
updated for .NET 2.0 - so you would do very well to stick with the
CodeProject articles by Jon Rista.

-HTH

-S
 
Back
Top