Most people don't agree with me, but I
think explict member implementation allow disambiguation of
interface members with the same signature.
Without explict interface member implementations it would be impossible for a class or a structure to have different implementations of interface members with the same signature and return type.
Why Explicit Implementation of a Interface can not be public?
When a member is explicitly implemented, it cannot be accessed through a class instance, but only through an instance of the interface.
public interface IPrinter
{
void Print();
}
public interface IScreen
{
void Print();
}
public class Document : IScreen,IPrinter
{
void IScreen.Print() { ...}
void IPrinter.Print() { ...}
}
.....
Document d=new Document();
IScreen i=d;
IPrinter p=d;
i.Print();
p.Print();
.....
Explict interface member implementations are not accessible through class or struct instances.