I'm working with an application that currently uses the appSettings
section to get application settings through ConfigurationManager.AppSettings
.
But I would like a more complex structure for my configuration, something like this:
<configuration>
<externalConnections>
<connection name="Conn1" type="sharepoint">
<username value="login">
</connection>
<connection name="Conn2" type="sap">
<username value="login">
<password value="password">
</connection>
</externalConnections>
</configuration>
I saw something related to configSections
but I do not know how to create a class to use this type of configuration.
How can I create this configuration class? How can this class be used from ConfigurationManager.AppSettings
also?