2
Reply

Q: will this code compile ? interface IMyInterface { void fun1(); void fun2(); } class MyClass : IMyInterface { void IMyInterface.fun1() { throw new NotImplementedException(); } void IMyInterface.fun2() { throw new NotImplementedException(); } }

Rajesh Singh

Rajesh Singh

8y
619
1
Reply

    No. It will throw up exception

    Ans: yes. fun1 and fun2 should be accessible through interface name if access modifier is private.