C# | SOLID Principles
SOLID stands for: S = Single Responsibility Principle O = Open/Closed Principle L = Liskov Substitution Principle I = Interface Segregation Principle D = Dependency Inversion Principle Solid Principles Single Responsibility Principle Each software module should have one and only one reason to change. The Single Responsibility Principle is the first principle of SOLID principles. It is the fundamental principle of object-oriented programming that determines how we should design classes. The Single Responsibility Principle states that: Each software module should have one and only one reason to change. In other words, a class should have only one responsibility and therefore it should have only one reason to change its code. If a class has more than one responsibility, then there will be more than one reason to change the class (code). Now, the question is what is responsibility? An application can have many functionalities (features). For example, an online e-commerce application ...
Comments
Post a Comment