Method Overriding
In this lesson, you'll learn about what method overriding is and how to achieve it in C#.
We'll cover the following...
A Brief Introduction
Method overriding is the process of redefining a parent class’ method in a subclass.
In other words, if a subclass provides the specific implementation of a method that has been declared by one of its parent classes, it is known as method overriding.
In the previous example, the Beverage
and Chocolate
classes were overriding the GetPrice()
and PrintDetails()
methods from the Product
...