Exemplo n.º 1
0
        public int GetOperandInt(string input)
        {
            int OperandInt;
            var operand = IoManager.ReadOperand(input);  //get new

            while (!int.TryParse(operand, out OperandInt))
            {
                Console.Write("Input must be double number !");
                operand = IoManager.ReadOperand(input);
            }
            return(OperandInt);
        }
Exemplo n.º 2
0
        public double GetOperandLR(string input)
        {
            double OperandInt;
            var    operand = IoManager.ReadOperand(input); //get new

            while (!double.TryParse(operand, out OperandInt))
            {
                Console.Write("Input must be double number !");
                operand = IoManager.ReadOperand(input);
            }
            if (LastResult == 0)
            {
                LastResult = OperandInt;
            }
            return(OperandInt);
        }