App.config :微软出于性能考虑,对ConfigurationManager采用了缓存策略

//查找msdn文档可以发现微软出于性能考虑,对ConfigurationManager采用了缓存策略,所以如果要读取新的值,应该使用ConfigurationManager的RefreshSection来进行
           

//刷新命名节,这样在下次检索它时将从磁盘重新读取它。
ConfigurationManager.RefreshSection("appSettings");

原文地址:https://www.cnblogs.com/Fooo/p/3066839.html