public void SetValue(string key, object value)
 {
     var stringValue = value != null ? value.ToString() : "";
     var configElement = (CustomConfigurationElement)base.BaseGet(key);
     if (configElement != null)
         configElement.Value = stringValue;
     else
     {
         configElement = new CustomConfigurationElement()
         {
             Key = key,
             Value = stringValue
         };
         base.BaseAdd(configElement);
     }
 }
        public void SetValue(string key, object value)
        {
            var stringValue = value != null?value.ToString() : "";

            var configElement = (CustomConfigurationElement)base.BaseGet(key);

            if (configElement != null)
            {
                configElement.Value = stringValue;
            }
            else
            {
                configElement = new CustomConfigurationElement()
                {
                    Key   = key,
                    Value = stringValue
                };
                base.BaseAdd(configElement);
            }
        }