private string ValidateCrlfValue(string v) { string[] valid = { "false", "true", "auto" }; if (!Array.Exists(valid, s => v == s)) throw new OptionException("error: autocrlf value must be one of true, false or auto", "autocrlf"); return v; }