Answer the question
In order to leave comments, you need to log in
Correct use of virtual, override, new?
Good day, comrades. To business.
When designing a class, we do not always know which methods we will have to override in the future. Does this mean that all methods should be made virtual? Or you can get by with new to override.
I know about the context of new and override. But it seems to me that in general it is more correct to use override, because it behaves more expectedly.
Answer the question
In order to leave comments, you need to log in
Does this mean that all methods should be made virtual?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question