Scenario :-
Private Implementation of Interface member.
Remember OOPS is a bit tricky and if you write MyClass definition as below then
public interface MyInterface1
{
int foo();
}
public class MyClass : myinterfacse
{
int a=10;
int foo()
{
return a;
}
}
It will give a compile time error.
Error 1 ‘WindowsFormsApplication3.Program.MyClass’ does not implement interface member ‘WindowsFormsApplication3.Program.myinterfacse.foo()’. ‘WindowsFormsApplication3.Program.MyClass.foo()’ cannot implement an interface member because it is not public.