private void Equal_Button_Clicked(object sender, EventArgs e)
 {
     if (currentOperatorSelected == "Divide")
     {
         MathematicalOperations mathOperations = new MathematicalOperations();
         finalResult = mathOperations.Divide(listOfNumbers);
         OperationValueSetter("Final Result : " + finalResult, true);
     }
     else if (currentOperatorSelected == "Multiply")
     {
         MathematicalOperations mathOperations = new MathematicalOperations();
         finalResult = mathOperations.Multiply(listOfNumbers);
         OperationValueSetter("Final Result : " + finalResult, true);
     }
     else if (currentOperatorSelected == "Addition")
     {
         MathematicalOperations mathOperations = new MathematicalOperations();
         finalResult = mathOperations.Addition(listOfNumbers);
         OperationValueSetter("Final Result : " + finalResult, true);
     }
     isOperatorSelected      = false;
     isDecimalClicked        = false;
     currentOperatorSelected = null;
     decimalValues           = null;
     listOfNumbers.Clear();
 }
예제 #2
0
        public int Multiplication(int num1, int num2)
        {
            var result = MathematicalOperations.Multiply(num1, num2);

            return(result);
        }