标签:return get 配置文件 读写 tin set ring ret level
class Config { static Configuration _config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); private Config() { } static public void AddAppSetting(string key, string value) { _config.AppSettings.Settings.Add(key, value); _config.Save(); } static public void SetAppSetting(string key, string value) { _config.AppSettings.Settings.Remove(key); _config.AppSettings.Settings.Add(key, value); _config.Save(); } static public string GetAppSetting(string key) { return _config.AppSettings.Settings[key].Value; } static public void DelAppSetting(string key) { _config.AppSettings.Settings.Remove(key); _config.Save(); } }
标签:return get 配置文件 读写 tin set ring ret level
原文地址:https://www.cnblogs.com/xslwm/p/9673969.html