Exemplo n.º 1
0
 internal static bool ParseBoolean(string key, string value)
 {
     if (!Format.TryParseBoolean(value, out bool tmp))
     {
         throw new ArgumentOutOfRangeException("Keyword '" + key + "' requires a boolean value");
     }
     return(tmp);
 }
 internal static bool ParseBoolean(string key, string value)
 {
     if (!Format.TryParseBoolean(value, out bool tmp))
     {
         throw new ArgumentOutOfRangeException(key, $"Keyword '{key}' requires a boolean value; the value '{value}' is not recognised.");
     }
     return(tmp);
 }