In simple words, When you implement the member of the interface in the class without specifying the interface name, then it's called as Implicit interface implementation.
On the other side, if you are creating the object of interface then calling it's method then it's explicit implementation.
Below is the simple example which explains the same.
interface ITest
{
void TestMethod();
}
class TestClass: ITest
{
public void TestMethod()
{
Console.WriteLine("Implicit Interface Implementation");
}
void ITest.TestMethod()
{
Console.WriteLine("Explicit Interface Implementation");
}
}
class Program
{
static void Main(string[] args)
{
TestClass obj = new TestClass();
obj.TestMethod(); //Way to call implicitely implemented method
ITest obj2 = new TestClass();
obj2.TestMethod();
Console.ReadLine();
}
}
Just to add the constraint with explicit implementation is that explicitly implemented member cannot be accessed through a class instance, but only through an instance of the interface. You can see the same in example above.