Hello Folks,
I was exploring the explicit interface implementation and got a question.
In the example below public void ITest.TestMethod() gives error however void ITest.TestMethod() works.
May I know the reason?
interface ITest {
void TestMethod();
}
class TestClass: ITest {
//public void ITest.TestMethod() //Error The modifier 'public' is not valid for this item
void ITest.TestMethod() //Works
{
Console.WriteLine("Explicit Interface Implementation");
}
}