开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜