What we know is that multiple (interface) inheritance is allowed in C #, but I want to know if two interfaces are possible Example:
interface calc1
{
int addsub(int a, int b);
}
interface calc2
{
int addsub(int x, int y);
}
with the same method name with the same type and with a parameter of the same type
will inherit in the class above?
class Calculation : calc1, calc2
{
public int result1;
public int addsub(int a, int b)
{
return result1 = a + b;
}
public int result2;
public int addsub(int x, int y)
{
return result2= a - b;
}
}
if so, which interface method will be called.
Thanks in advance.
source
share