[ServiceContract] public interface IService2 { [OperationContract] Int32 ADD(Int32 num1 , Int32 num2); [OperationContract] Int32 MULTIPLY(Int32 num1, Int32 num2); [OperationContract] Int32 SUBTRACT(Int32 num1, Int32 num2); [OperationContract] Int32 DIVISION(Int32 num1, Int32 num2);
public Int32 ADD(Int32 num1, Int32 num2) { return num1 + num2; } public Int32 MULTIPLY(Int32 num1, Int32 num2) { return num1 - num2; } public Int32 SUBTRACT(Int32 num1, Int32 num2) { return num1 * num2; } public Int32 DIVISION(Int32 num1, Int32 num2) { if (num2.Equals(0)) { return num1; } else { return num1 / num2; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)