SOLID Principles
Feb 13, 2021 13:22 0 Comments ASP.NET PADMAKEECHU

What does SOLID mean ?

SOLID stands for the following –

  • Single Responsibility Principle –

It states that “A class should have one and only one reason to change”.

Let’s see an example -

So, we see here that there are two responsibilities of this class as shown above.

In order to solve this problem, we will create two different classes as shown below.

  • Open/Closed Principle –

It states that “Software entities should be open for extension but closed for modification”.

Let’s see an example -

  • Liskov’s Substitution Principle –

It states that “A subclass should behave in such a way that it will not cause problems when used instead of the superclass”.

Let’s see an example -