Loading ...

Code for the Calculator Service

 /5
0 (0votes)

 

public class CalculatorService : ICalculator

{

    public double Add(double n1, double n2)

    {

        AccessControlHelper.DemandActionClaim("Calculator.Add");

        return n1 + n2;

    }

 

    public double Subtract(double n1, double n2)

    {

        AccessControlHelper.DemandActionClaim("Calculator.Subtract");

        return n1 - n2;

    }

 

    public double Multiply(double n1, double n2)

    {

        AccessControlHelper.DemandActionClaim("Calculator.Multiply");

        return n1 * n2;

    }

 

    public double Divide(double n1, double n2)

    {

        AccessControlHelper.DemandActionClaim("Calculator.Divide");

        return n1 / n2;

    }

}

 

Comments (no comments yet)

Top Posts