System.Data.ExprException.InvalidNameBracketing C# (CSharp) Méthode

InvalidNameBracketing() public static méthode

public static InvalidNameBracketing ( string name ) : Exception
name string
Résultat System.Exception
        public static Exception InvalidNameBracketing(string name)
        {
            return _Syntax(SR.Format(SR.Expr_InvalidNameBracketing, name));
        }

Usage Example

Exemple #1
0
        /// <summary>
        ///      recognize bracketed identifiers.
        ///      Special case: we are using '\' character to escape '[' and ']' only, so '\' by itself  is not an escape
        /// </summary>
        private void ScanName(char chEnd, char esc, string charsToEscape)
        {
            char[] text = _text;

            Debug.Assert(chEnd != '\0', "Invalid bracket value");
            Debug.Assert(esc != '\0', "Invalid escape value");
            do
            {
                if (text[_pos] == esc)
                {
                    if (_pos + 1 < text.Length && charsToEscape.IndexOf(text[_pos + 1]) >= 0)
                    {
                        _pos++;
                    }
                }
                _pos++;
            } while (_pos < text.Length && text[_pos] != chEnd);

            if (_pos >= text.Length)
            {
                throw ExprException.InvalidNameBracketing(new string(text, _start, (_pos - 1) - _start));
            }

            Debug.Assert(text[_pos] == chEnd, "Invalid bracket value");

            _pos++;

            _token = Tokens.Name;
        }
All Usage Examples Of System.Data.ExprException::InvalidNameBracketing