The following is my IOperation interface which has two signatures :
public interface IOperations
{
int Mul(int a, int b);
int Sum(int a, int b);
}
In the Operation class i have implemented the aforementioned methods:
public class Operations:IOperations
{
public int Mul(int a,int b)
{
return a * b;
}
public int Sum(int a,int b)
{
return a + b;
}
}
Now in the main Program how should i meet the DI?like this?
static void Main(string[] args)
{
IOperations myOperations = new Operations();
myOperations.Mul(3, 2);
}