Virtual Methods and Properties
Learn how to customize inherited behavior in C# using virtual methods, property overrides, and the sealed modifier.
We'll cover the following...
We'll cover the following...
When we inherit a method from a base class, we might need to change its behavior in a child class. This ability to provide specific implementations for a general action is a core pillar of polymorphism in C#.
Consider the following example: