InvalidDate() 공개 정적인 메소드

public static InvalidDate ( string date ) : Exception
date string
리턴 System.Exception
예제 #1
0
        /// <summary>
        ///     Just read the string between '#' signs, and parse it later
        /// </summary>
        private void ScanDate()
        {
            char[] text = _text;

            do
            {
                _pos++;
            } while (_pos < text.Length && text[_pos] != '#');

            if (_pos >= text.Length || text[_pos] != '#')
            {
                // Bad date constant
                if (_pos >= text.Length)
                {
                    throw ExprException.InvalidDate(new string(text, _start, (_pos - 1) - _start));
                }
                else
                {
                    throw ExprException.InvalidDate(new string(text, _start, _pos - _start));
                }
            }
            else
            {
                _token = Tokens.Date;
            }
            _pos++;
        }
예제 #2
0
        /// <devdoc>
        ///     Just read the string between '#' signs, and parse it later
        /// </devdoc>
        private void ScanDate()
        {
            char[] text = this.text;

            do
            {
                pos++;
            } while (pos < text.Length && text[pos] != '#');

            if (pos >= text.Length || text[pos] != '#')
            {
                // Bad date constant
                if (pos >= text.Length)
                {
                    throw ExprException.InvalidDate(new string(text, start, (pos - 1) - start));
                }
                else
                {
                    throw ExprException.InvalidDate(new string(text, start, pos - start));
                }
            }
            else
            {
                token = Tokens.Date;
            }
            pos++;
        }
예제 #3
0
 private void ScanDate()
 {
     char[] text = this.text;
     do
     {
         this.pos++;
     }while ((this.pos < text.Length) && (text[this.pos] != '#'));
     if ((this.pos >= text.Length) || (text[this.pos] != '#'))
     {
         if (this.pos >= text.Length)
         {
             throw ExprException.InvalidDate(new string(text, this.start, (this.pos - 1) - this.start));
         }
         throw ExprException.InvalidDate(new string(text, this.start, this.pos - this.start));
     }
     this.token = Tokens.Date;
     this.pos++;
 }