Interface Segregation Principle in C# with Examples | ISP in SOLID | ISP in C#
In this video, I am going to Discuss Interface Segregation Principle in C# with Examples. The Letter I in SOLID stands for Interface Segregation Principle which is also known as ISP. As part of this video, we are going to discuss the following pointers.
What is the Interface Segregation Principle in C#?
Example without using the Interface Segregation Principle in C#.
Problems if not following Interface Segregation Principle
Example using the Interface Segregation Principle in C#.
What is Interface Segregation Principle?
The Interface Segregation Principle states that "Clients should not be forced to implement any methods they don’t use. Rather than one fat interface, numerous little interfaces are preferred based on groups of methods with each interface serving one submodule".
Let us break down the above definition into two parts.
First, no class should be forced to implement any method(s) of an interface they don’t use.
Secondly, instead of creating large interfaces, create multiple smaller interfaces with the aim that the clients should only think about the methods that are of interest to them.
As per the Single Responsibility Principle of SOLID, like classes, interfaces also should have a single responsibility. That means we shouldn’t force any class to implement any method(s) which they don’t require.
Text Version of this Video: https://dotnettutorials.net/lesson/in...
Single Responsibility Principle in C#: • Single Responsibility Principle in C#...
Open-Closed Principle in C#: • Open-Closed Principle in C# with Exam...
Liskov Substitution Principle in C#: • Liskov Substitution Principle in C# w...
Dependency Inversion Principle in C#: • Dependency Inversion Principle in C# ...
Friend, if you do have any questions or suggestions regarding this Interface Segregation 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.
#InterfaceSegregationPrincipleInCsharp #ISPinSOLID #ISPinCsharp #InterfaceSegregationPrincipleInCsharpWithExamples #ISPinSOLIDwithExamples #ISPinCsharpwithExamples #CsharpInterfaceSegregationPrinciple #CsharpInterfaceSegregationPrincipleExamples