Skip to content

Latest commit

 

History

History
12 lines (7 loc) · 467 Bytes

File metadata and controls

12 lines (7 loc) · 467 Bytes

Open-Closed Principle (OCP)


Important According to this principle, software entities (classes, modules, functions, etc.) should be open for extension but closed for modification. In other words, you should be able to add new features or functionality to a module without altering its source code. This helps in preventing issues that can arise from changes in the existing functionality.


Examples

Example in C#