Thursday, 31 March 2022

SOLID stands for: 

  • S - Single-responsibility Principle 
    • The principle defines that A class should have one and only one reason to change, meaning that a class should have only one functionality to handle.

  • O - Open-closed Principle 
    • Objects or entities should be open for extension but closed for modification.

  • L - Liskov Substitution Principle 
    • The principle defines that objects of a superclass shall be replaceable with objects of its subclasses without breaking the application. That requires the objects of your subclasses to behave in the same way as the objects of your superclass. 

  • I - Interface Segregation Principle 
    • Clients should not be forced to depend upon interfaces that they do not use.

  • D - Dependency Inversion Principle: Robert C. Martin’s definition of the Dependency Inversion Principle consists of two parts:
    • High-level modules should not depend on low-level modules. Both should depend on abstractions.
    • Abstractions should not depend on details. Details should depend on abstractions.
We will see each principle in detail with an example.

SOLID Principle in C# - The First 5 Principles of Object Oriented Design

SOLID stands for:  S - Single-responsibility Principle  The principle defines that A class should have one and only one reason to change, m...

 

Technical Talks © 2015 - Designed by Templateism.com, Distributed By Blogger Templates