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); }
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); }