Open-Closed Principle

Topics: SOLID Principles

The Open-Closed Principle says software entities should be open to extension but closed to modification.

The 2nd of the SOLID Principles.

Open for extension, closed for modification

Don’t change behaviour on existing code depending on your code.