System.ComponentModel.ScriptExpression.IsValidIdentifier C# (CSharp) Method

IsValidIdentifier() private static method

private static IsValidIdentifier ( string name ) : bool
name string
return bool
        private static bool IsValidIdentifier(string name)
        {
            if (Char.IsDigit(name[0])) {
                return false;
            }
            for (int i = 0; i < name.Length; i++) {
                char ch = name[i];
                if ((ch != '_') && (ch != '$') && (Char.IsLetterOrDigit(ch) == false)) {
                    return false;
                }
            }
            return true;
        }