AwesomeComputers.CPU128.CalculateSquareNumber C# (CSharp) Method

CalculateSquareNumber() public method

public CalculateSquareNumber ( ) : int
return int
        public int CalculateSquareNumber()
        {
            int valueFromTheRam = this.ram.LoadValue();
            if (valueFromTheRam < 0)
            {
                throw new ArgumentException("Number too low.");
            }
            else if (valueFromTheRam > 2000)
            {
                throw new ArgumentException("Number too high.");
                // TODO:  Catch the exception and draw it with the video card
            }
            else
            {
                return valueFromTheRam * 2;
                // TODO: use this later at the rendering: string.Format("Square of {0} is {1}.", valueFromTheRam, value)
            }
        }