Interviews2 answers
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(); } }
2 Answers
No. It will throw up exception
Vineet KumarPosted Jan 12, 2017, 8:53 PM EST
Ans: yes. fun1 and fun2 should be accessible through interface name if access modifier is private.
Rajesh SinghPosted Dec 1, 2015, 1:46 AM EST

