Correct way to read configuration file and using configuration values
- by Harza
I'm reading applications .config file using .NET ConfigurationManager like it should be done, but ....
Which one is most preferred option:
Read config and store instance of (build in or custom) ConfigurationElement for later use
Read config and store only needed values (but not instances of ConfigrationElement classes) for later use
Read ConfigurationElement from config always when configuration values are needed
These two things are in my mind:
Performance impact in case 3 when reading config all the time
Problems occuring in case 1 when using cached instances of ConfigurationElements