Understanding the Open/Closed Principle with C# Examples
Photo Credit: unsplash/crisdinoto In this post, we are going to learn about the Open/Closed Principle which is one of the five SOLID design principles described by Robert C. Martin . What is the Open/Closed Principle? First, let’s summarize the core definition of what the Open/Closed Principle is. The Open-Closed Principle (OCP) states that software entities (classes, modules, methods, etc.) should be open for extension, but closed for modification. In other words, with this principle, we will …