Multiple choice technology programming languages

What is the keyword used in overriding

  1. virtual,override

  2. override,new

  3. new,base

  4. base,override

Reveal answer Fill a bubble to check yourself
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.