I have a constructor that returns the result of two ints with a 'to the power of' operator. I am trying to use the math.pow method to do this but im not to sure how it work.
Here is my constructor
public int Power (int firstNumber, int secondNumber)
{
result = Math.Pow(firstNumber, secondNumber);
return result;
}
and the code that calls it
case "^":
result = application.Power(firstInt, secondInt);
labelResult.Text = ("" + result);
break;
How do i use the Math.Pow method in this situation?