예제 #1
0
        public double CreateOperand(string input)
        {
            var IManage = new IManager();

            double OperandInt;

            IManage.Print(input);
            string InputOperand = Console.ReadLine();  //get new

            while (!double.TryParse(InputOperand, out OperandInt))
            {
                IManage.Print("Incorrect input !");
                Console.Write(input);
                InputOperand = Console.ReadLine();
            }
            return(double.Parse(InputOperand));
        }
예제 #2
0
        public int GetSize(string input)
        {
            var IManage = new IManager();

            int OperandInt;

            IManage.Print(input);
            string InputOperand = Console.ReadLine();  //get new

            while (!int.TryParse(InputOperand, out OperandInt))
            {
                IManage.Print("Incorrect input !");
                Console.Write(input);
                InputOperand = Console.ReadLine();
            }
            return(int.Parse(InputOperand));
        }