Re-cache App.Config
Is it posible to re-cach开发者_JAVA百科e app.config? for example after changing some fields in app.config do not restart application.
Thanks.
Have a look at this answer: Change connection string & reload app.config at run time
You can refresh certain sections of the configuration file using the ConfigurationManager
class so the next time that section needs to be read, it's pulled from disk.
http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.refreshsection%28VS.80%29.aspx
精彩评论