I have a situation, where two classes (one deriving from the other) both implement the same interface explicitly:
interface I
{
int M();
}
class A : I
{
You can't call Explicit interface method in base class,here i solved this issue
I have two interface -> Interface1 and Interface2
public interface Interface1
{
string method2();
}
public interface Interface2
{
string method22();
}
Main class Method
class Program
{
static void Main(string[] args)
{
class1 cls = new class1();
string str = cls.method2();
}
}
and my interface implemented class
class class1 : Interface1, Interface2
{
#region Interface1 Members
public string method2()
{
return (this as Interface2).method22();
}
#endregion
#region Interface2 Members
string Interface2.method22()
{
return "2";
}
#endregion
}