在运行时更新app.config中的值 [英] Updating a value in app.config at runtime
本文介绍了在运行时更新app.config中的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在相同的解决方案下有两个项目。我使用一个项目来更新第二个项目的app.config文件。通过使用GetSection方法和ClientSettingsSection类,我设法读取了所需的值,但是找不到如何更新这些值。
I've got two projects under the same solution. I use one project to update the app.config file of the second project. I manage to read the values I need, by using the GetSection method and the ClientSettingsSection class, but I can't find how to update those values.
推荐答案
ConfigurationManager.RefreshSection(sectionName);
这是您的意思吗?
这篇关于在运行时更新app.config中的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文