Could someone tell me the advantages to using the ConfigurationManager class which load’s a config file for manipulation VS an XML file with a class you build to read it yourself?
Recently, I built a class which inherits from ConfigurationSection in order to manipulate a custom section within app.config. This was quite a bit of work compared to just opening and reading an XML file.
Some people chose the first approach, others chose the second.
What’s good practice?
This is an old question, but what the hell… so yes, there is quite some code overhead in writing configuration sections and elements, but what you get as compared to using your own class with an XML serializer include:
There’s probably other benefits, but that’s what comes to mind so far.