Say, I have three interfaces:
public interface I1
{
void XYZ();
}
public interface I2
{
void XYZ();
}
public interface I3
{
void XYZ();
}
A class inheriting from these three interfaces:
class ABC: I1,I2, I3
{
// method definitions
}
Questions:
If I implement like this:
class ABC: I1,I2, I3 {
public void XYZ() { MessageBox.Show("WOW"); }
}
It compiles well and runs well too! Does it mean this single method implementation is sufficient for inheriting all the three Interfaces?
How can I implement the method of all the three interfaces and CALL THEM? Something Like this:
ABC abc = new ABC(); abc.XYZ(); // for I1 ? abc.XYZ(); // for I2 ? abc.XYZ(); // for I3 ?
I know it can done using explicit implementation but I'm not able to call them. :(