Skip to content

Latest commit

 

History

History
12 lines (7 loc) · 459 Bytes

File metadata and controls

12 lines (7 loc) · 459 Bytes

Liskov Substitution Principle (LSP)


Important This principle extends the Open-Closed Principle by focusing on the behavior of a superclass and its subclasses. It states that any class that is the child of a parent class should be usable in place of its parent without any unexpected behavior. This means that a subclass should enhance, not change, the behavior of the superclass.


Examples

Example in C#