To implement an interface member, the corresponding member of the implementing class must be public. source: Interfaces (C# Programming Guide)
I know it works if its private, but i would like to understand why it can not be public ?
To implement an interface member, the corresponding member of the implementing class must be public. source: Interfaces (C# Programming Guide)
I know it works if its private, but i would like to understand why it can not be public ?
When implemented explicitly interface methods are public by default and that's why you cannot use access modifiers.
A quote from msdn.com :
source : https://msdn.microsoft.com/en-us/library/aa288461%28v=vs.71%29.aspx
P.S. Difference between implicit and explicit implementation :