zoukankan      html  css  js  c++  java
  • winform 读取保存配置文件

    原文连接:


            public static string fileName = System.IO.Path.GetFileName(Application.ExecutablePath);
            public static bool addSetting(string key, string value)
            {
                Configuration config = System.Configuration.ConfigurationManager.OpenExeConfiguration(fileName);
                config.AppSettings.Settings.Add(key, value);
                config.Save();
                return true;
            }
            public static string getSetting(string key)
            {
                Configuration config = System.Configuration.ConfigurationManager.OpenExeConfiguration(fileName);
                string value = config.AppSettings.Settings[key].Value;
                return value;
            }
            public static bool updateSeeting(string key, string newValue)
            {
                Configuration config = System.Configuration.ConfigurationManager.OpenExeConfiguration(fileName);
                string value = config.AppSettings.Settings[key].Value = newValue;
                config.Save();
                return true;
            }

  • 相关阅读:
    js+分布上传大文件
    java+大文件断点续传
    word粘贴图片到ekitor
    ckeditor从word粘贴图片
    word粘贴图片到ckeitor
    2g 大文件上传
    php+大视频文件上传+进度条
    java+Word图片上传控件
    断点续传管理系统
    富文本编辑器粘贴复制Word
  • 原文地址:https://www.cnblogs.com/lsysunbow/p/5056015.html
Copyright © 2011-2022 走看看