Skip to main content

What is method overriding?

Entry C#
Quick Answer When a child class provides its own version of a parent class method, that's overriding. The parent marks it virtual, the child uses override. At runtime, even holding a base class reference, the child's version gets called รขโ‚ฌโ€ that's the whole point.

Answer

Child class provides new implementation for a parent class method.


public virtual void Speak() { }

public override void Speak() { }


S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice