开发者

Changing Visual Studio settings file at runtime

开发者 https://www.devze.com 2023-02-06 06:47 出处:网络
I wonder if I add a setting file to my Visual Studio (WinForms) project if it is possible 开发者_开发技巧to change a setting value without needing to rebuild the project?

I wonder if I add a setting file to my Visual Studio (WinForms) project if it is possible 开发者_开发技巧to change a setting value without needing to rebuild the project? Beside App.Config I want to be able to change specific setting in another setting file. But I don't want to recompile the code since I'm in production.


We've created a new configuration class that reads from a separate configuration file (the path to which is specified in app.config). This class works just like ConfigurationManager, but it auto-refreshes its configuration data every X minutes.

This lets us change a configuration setting in our website without effectively restarting the app pool.

Make sense?

0

精彩评论

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