ARUP.IssueTracker.Classes.MySettings.Set C# (CSharp) Метод

Set() публичный статический Метод

public static Set ( string key, string value ) : void
key string
value string
Результат void
        public static void Set(string key, string value)
        {
            try
            {
                Configuration config = GetConfig();
                if (config == null)
                    return;

                KeyValueConfigurationElement element = config.AppSettings.Settings[key];
                if (element != null)
                    element.Value = value;
                else
                    config.AppSettings.Settings.Add(key, value);

                config.Save(ConfigurationSaveMode.Modified);

            }
            catch (System.Exception ex1)
            {
                MessageBox.Show("exception: " + ex1);
            }
        }
        private static Configuration GetConfig()