interface A1 {
void jj();
void ff() { /* */}
}
class B1 : A1 {
public void jj() { }
void ff() { /* */}
}
I am implementing two methods in the B1 class: the jj(), which does not have a default implementation in the interface A1, and the ff(), which does have a default implementation in the interface A1.
I am wondering why do not we use the override keyword when implementing a method from an interface since those methods in the interfaces are wither abstract or virtual?:
jj : abstract
ff : virtual
10 years ago, you could say that it is because the interface does not have a default implementation and that is why we do not override, we implement. BUT starting from C# 8.0 default implementations are possible and so why is that that we are not OBLIGED to use the override keyword?