Example #1
0
 public static int ValidateOperand2(int secondOperand)
 {
     try
     {
         var SecondOperand = new Operand2(Convert.ToInt32(Console.ReadLine()));
     }
     catch (Exception)
     {
         Console.WriteLine("FormatException. Enter operarator again");
     }
     return(secondOperand);
 }
Example #2
0
        public static void Main(string[] args)
        {
            var userMenu = new Menu();
            var ioSystem = new IoManager();

            //ioSystem.Print("enter operand");

            //????????? Validation.ValidateOperand();

            ioSystem.Print("enter operand");
            var FirstOperand = new Operand1(Convert.ToInt32(Console.ReadLine()));

            ioSystem.Print("enter operand");
            var SecondOperand = new Operand2(Convert.ToInt32(Console.ReadLine()));



            /*int firstOperand = 0;
             * int secondOperand = 0;
             *
             * Validation.ValidateOperand1(firstOperand);
             *
             * Validation.ValidateOperand2(secondOperand);*/

            bool toContinue = true;

            while (toContinue)
            {
                Console.WriteLine("1. actions with matrices \t 2. actions with numbers  \t 3. exit");
                Console.WriteLine("choose something:");
                try
                {
                    int command = Convert.ToInt32(Console.ReadLine());

                    switch (command)
                    {
                    case 1:
                        //matrix
                        break;

                    case 2:



                    case 3:
                        toContinue = false;
                        continue;
                    }
                }
            }
        }