我使用如下代码读取app.config配置文件然后修改保存。可是当我把程序关了之后app.config文件又回到修改前的样子 到底哪里没有保存好???求助啊static public Configuration cfa = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
GetSum = Int64.Parse(ConfigurationManager.AppSettings["GetSum"]);
cfa.AppSettings.Settings["GetSum"].Value = para_text.GetSum.ToString();
cfa.Save();
ConfigurationManager.RefreshSection("appSettings");
GetSum = Int64.Parse(ConfigurationManager.AppSettings["GetSum"]);
cfa.AppSettings.Settings["GetSum"].Value = para_text.GetSum.ToString();
cfa.Save();
ConfigurationManager.RefreshSection("appSettings");
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货