示例#1
0
 /// <summary>
 ///
 /// </summary>
 /// <returns>true if changed, false otherwise.</returns>
 public static bool Set <T>(this SharpConfig.Setting setting, T value)
 {
     if (!setting.IsArray && string.IsNullOrEmpty(setting.GetValue <string>()))
     {
         if (!setting.GetValue <T>().Equals(value))
         {
             setting.SetValue(value);
             return(true);
         }
     }
     return(false);
 }