I have three classes.
Person → Employee → Manager
A person has a virtual method declared as
public virtual void saySomething()
Inside the employee i
public virtual void saySomething()
OR
public override void saySomething()
And I get the same behavior
Inside the manager I have
public override void saySomething()
Am I confused that I can use override instead of virtual? I thought you were using redefinition to denote the fact that this class redefined one of the functions of the base class.
How to stop a method from overriding? This is the last method.
source
share