Suppose we have an interface I with one method, call it method(). We have class A that implements the interface, and a class B that derive from A. Both classes decide to hidde the implementation of the interface. How can a method of class B, lets call it ShowUpperMethod(), can call method() in A
PD> Here is the code to help understand... :) thx.
namespace ExplicitImplementation
{
public interface I
{
void method ();
}
public class A : I
{
void I.method ()
{
Console.WriteLine ("Im class A implementing interface...");
}
}
public class B : A, I
{
public void ShowUpperMethod ()
{
// I want to call the method() in the upper class.
}
void I.method ()
{
Console.WriteLine ("Im class B implementing interface...");
}
}
}