In some ways new
and virtual/override
are opposite keywords.
virtual / override
: used to declare a single method with a single implementation across a range of types in an inheritance hierarchynew
: used to explicitly declare a new method separate from all other methods with the same signature. Not havingnew
has the same effect it's just implicit
In this case the code has no virtual
methods and hence the compiler is statically binding to the method dictated by the type of the reference on which it is invoked