
Liskov Substitution Principle in C# with Examples
Published at : September 04, 2021
Liskov Substitution Principle in C# with Examples
As part of this video, you will understand the following pointers.
1. What is the Liskov Substitution Principle?
2. Example without using Liskov Substitution Principle.
3. How to Implement Liskov Substitution Principle in C#?
4. Example using the Liskov Substitution Principle.
The Liskov Substitution Principle is a Substitutability principle in object-oriented programming Language. This principle states that, if S is a subtype of T, then objects of type T should be replaced with the objects of type S.
In simple words we can say that, when we have a base class and child class relationships i.e. inheritance relationships, then, if we can successfully replace the object/instance of a parent class with an object/instance of the child class, without affecting the behavior of the base class instance, then it is said to be in Liskov Substitution Principle. If you are not getting this point properly, don’t worry, we will see some real-time examples to understand this concept.
For example, a father is a teacher whereas his son is a doctor. So here, in this case, the son can not simply replace his father even though both belong to the same family.
Text Version: https://dotnettutorials.net/lesson/liskov-substitution-principle/
Single Responsibility Principle in C#: https://www.youtube.com/watch?v=o1oREIHHQAQ
Open-Closed Principle in C#: https://www.youtube.com/watch?v=wl-EhFqPwxs
Interface Segregation Principle in C#: https://www.youtube.com/watch?v=Ru8SLFr-1jg
Dependency Inversion Principle in C#: https://www.youtube.com/watch?v=H-cp2vnqPpo
Friend, if you do have any questions or suggestions regarding this Liskov Substitution Principle in C# with Examples video, then please comment to us. In the next video, first I will clear your doubts and questions, then only proceed for the next video. I am going to read all the comments and will try to reply to you all.
If you like this video, then please subscribe to our channel for more videos, and don't forget to press the Bell Icons.
As part of this video, you will understand the following pointers.
1. What is the Liskov Substitution Principle?
2. Example without using Liskov Substitution Principle.
3. How to Implement Liskov Substitution Principle in C#?
4. Example using the Liskov Substitution Principle.
The Liskov Substitution Principle is a Substitutability principle in object-oriented programming Language. This principle states that, if S is a subtype of T, then objects of type T should be replaced with the objects of type S.
In simple words we can say that, when we have a base class and child class relationships i.e. inheritance relationships, then, if we can successfully replace the object/instance of a parent class with an object/instance of the child class, without affecting the behavior of the base class instance, then it is said to be in Liskov Substitution Principle. If you are not getting this point properly, don’t worry, we will see some real-time examples to understand this concept.
For example, a father is a teacher whereas his son is a doctor. So here, in this case, the son can not simply replace his father even though both belong to the same family.
Text Version: https://dotnettutorials.net/lesson/liskov-substitution-principle/
Single Responsibility Principle in C#: https://www.youtube.com/watch?v=o1oREIHHQAQ
Open-Closed Principle in C#: https://www.youtube.com/watch?v=wl-EhFqPwxs
Interface Segregation Principle in C#: https://www.youtube.com/watch?v=Ru8SLFr-1jg
Dependency Inversion Principle in C#: https://www.youtube.com/watch?v=H-cp2vnqPpo
Friend, if you do have any questions or suggestions regarding this Liskov Substitution Principle in C# with Examples video, then please comment to us. In the next video, first I will clear your doubts and questions, then only proceed for the next video. I am going to read all the comments and will try to reply to you all.
If you like this video, then please subscribe to our channel for more videos, and don't forget to press the Bell Icons.

Liskov Substitution Principle in C# with ExamplesLiskov Substitution Principle in C#Liskov Substitution Principle