public static void updateConfig(string key,string value) { System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); config.AppSettings.Settings[key].Value = value; config.Save(ConfigurationSaveMode.Modified); ConfigurationManager.RefreshSection("appSettings"); }
保存对配置文件的修改
最新推荐文章于 2022-11-22 16:15:48 发布