I want to add a custom configuration section to my App.Config file in my C# 2010 project. I want the section to look like the following.
<DmModules>
<Module Name="Module1">
<add key="DbType" value="...">
<add key="ConnType" value="...">
</Module>
<Module Name="Module2">
<add key="DbType" value="...">
<add key="ConnType" value="...">
</Module>
</DmModules>
Of course there can be as many <Module> elements as needed, and each <Module> must contain two keys as specified.
Note : DbType and ConnType doesn't necessarily have to be "key", but even something like the following would do as long as I can read that value later from another part of my program.
<Module Name="Module1">
<DbType Name="..."/>
<ConnType Name="..."/>
</Module>
So as said in the above note, I need to be able to read these values later from inside my program and use the values. How can it be done?