Multiple choice technology programming languages

What does 'new' keyword do when used as a modifier for a method (inheritance)?

  1. Adds a Reference to the parents class method

  2. it only hides the parent class method

  3. it overrides the parent class method

  4. None

  5. All the Above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In C#, using the new keyword as a method modifier explicitly hides the inherited method of the same signature from the parent class. It does not override it (which requires the override keyword) or add a reference to it.