public static NameValidity NameIsValid(string name) { if (!ValidCharacters.IsMatch(name)) { return(NameValidity.InvalidCharacter); } if (UnoKeywords.Contains(name)) { return(NameValidity.InvalidKeyword); } if (CSharpKeywords.Contains(name)) { return(NameValidity.InvalidKeyword); } return(NameValidity.Valid); }