When you create a method which is named InternfaceName.MethodName
it is called Explicit interface implementation.
What it means is that that method is accessible only through a reference of the interface type.
So… How can you call to that method from within the class? Cast this
to the interface type!
public void MyBalance()
{
Console.WriteLine(" My balance");
((IAccount)this).Balance();
}
0
solved Calling method inside a method in Interface c#