Hi,
I would like to configure some device connections through app.config.
I created the following config file but it fails because I have the same
section more than once :
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="Connections">
<section name="Connection"
type="System.Configuration.NameValueSectionHandler " />
</sectionGroup>
</configSections>
<Connections>
<Connection>
<add key="ComPort" value="COM2" />
<add key="Name" value="Connection 1" />
<add key="ID" value="1" />
</Connection>
<Connection>
<add key="ComPort" value="COM4" />
<add key="Name" value="Connection 2" />
<add key="ID" value="2" />
</Connection>
</Connections>
</configuration>
I have 2 questions :
1) How should I modify this configuration file ?
2) Now that ConfigurationSettings.GetConfig is obsolete, is does not
seems clear for me how to use ConfigurationManager to read the config
file.
Thanks in advance,
Droopy.