Region.ToString C# (CSharp) Method

ToString() public method

String reprensetation of the region
public ToString ( ) : string
return string
	public override string ToString()
	{
		 return new RectOffset(left, right, top, bottom).ToString();
	}
	

Usage Example

Exemplo n.º 1
0
        public string ReadNumber(out Region reg)
        {
            reg = StartRegion();
            if ((CurChar == '+' || CurChar == '-') && Peek(1) == '.' && !IsDigit(Peek(2)))
            {
                Throw($"Expected number, got {new string(new char[] { CurChar, Peek(1), Peek(2) }).Inspect()}...");
            }
            else if ((CurChar == '+' || CurChar == '-') && !IsDigit(Peek(1)))
            {
                Throw($"Expected number, got {new string(new char[] { CurChar, Peek(1) }).Inspect()}...");
            }
            else if (CurChar == '.' && !IsDigit(Peek(1)))
            {
                Throw($"Expected number, got {new string(new char[] { CurChar, Peek(1) }).Inspect()}...");
            }
            else if (!IsDigit(CurChar))
            {
                Throw($"Expected number, got {CurChar.Inspect()}");
            }
            if (CurChar == '0' && Peek(1) == 'x')
            {
                Move(2);
                while (!EOF && IsHexDigit(CurChar))
                {
                    Move();
                }
                reg.End();
                return(reg.ToString());
            }
            Move();
            if (CurChar == '.')
            {
                Move();
            }
            while (!EOF && IsDigit(CurChar))
            {
                Move();
            }

            if (CurChar == '.')
            {
                Move();
                while (!EOF && IsDigit(CurChar))
                {
                    Move();
                }
            }

            reg.End();

            return(reg.ToString());
        }
All Usage Examples Of Region::ToString