I have read this article which talks about reasons why default implementetion for methods as well as access modifiers in interfaces were allowed beginning with C#8
But I can not understand why do we have to specify public access modifier when implementing a non-public method from an interface in a class, for example?
If i use the same access modifier as in the interface, the method will not be counted as an implemented method in the implementing class.
Here is an example
interface aa {
protected internal void jj();
internal void jj1();
protected void jj2();
private protected void jj3();
protected internal void ff() { }
internal void ff1() { }
protected void ff2() { }
private protected void ff3() { }
}
class bb:aa {
public void jj() { }
public void jj1() { }
public void jj2() { }
public void jj3() { }
public void ff() { }
public void ff1() { }
public void ff2() { }
public void ff3() { }
}
EDIT:
So from your comments I see that I am only overriding the public members, so My visual Studio is tricking me here since it says that I do actually override them?