C#C
C#14mo ago
Decoherence

overriding methods

I have multiple questions:

1) What is the benefit of declaring a base method as
virtual
before overriding it in an inheriting class? This is my understanding: it allows calling the override despite casting to the base class. Is this correct?

2) What is the difference between overriding a method, and hiding a method? As in, what does the
new
keyword do exactly?
Was this page helpful?
overriding methods - C#