Search code examples
c#configurationmanager

C# ConfigurationManager - Subsections?


Can anyone explain to me how to work with subsections in ConfigurationManager .config file?

This is what I've tried so far (not working):

Here is my .config: http://pastebin.com/kxYGnD2j (sorry, I'm struggling with the code format)

Main.cs: http://pastebin.com/mWggzbD4

Thanks!

------EDIT-------

Got it! "SectionGroup" was what I was looking for: http://msdn.microsoft.com/en-us/library/system.configuration.configurationsectiongroup.aspx

Only had to change the .config, my Main.cs was perfectly fine!

Thanks guys!!!

P.S. I cannot self-answer right now, gonna do it in 6 hours.


Solution

  • Got it! "SectionGroup" was what I was looking for: http://msdn.microsoft.com/en-us/library/system.configuration.configurationsectiongroup.aspx

    Only had to change the .config, my Main.cs was perfectly fine!

    Thanks guys!!!