What is the keyword used in overriding
-
virtual,override
-
override,new
-
new,base
-
base,override
A
Correct answer
Explanation
In C#, method overriding requires the base class method to be marked 'virtual' (or abstract) and the derived class method to be marked 'override'. The 'virtual' keyword allows the method to be overridden, while 'override' explicitly indicates that the method overrides a base class method. 'new' hides the base method, 'base' calls the base class implementation.