Virtual Methods and Properties

Learn how to customize inherited behavior in C# using virtual methods, property overrides, and the sealed modifier.

When we inherit a method from a base class, we might need to change its behavior in a child class. Consider the following example: