It is Software Design Principles, as below
- S - Single-Responcibility
- O - Open-closed
- L - Liskov Substitution
- I - Interface segretation
- I - Dependency inversion
Single-Responcibility - Class or entities should have one only task and only reason to change that particular task, meaning do not define all the functionalities in the single class/enity.
Open-closed - Class or entities should allow to extend further but not modification. So Open for extension and closed for any modification.
Liskov Substitution - Subclasses should be substitutable for base classes.
When we define class and no intention to inherit from any other class and they can never be used as a base class.
The sealed modifier is used to prevent derivation from a class. We encounter compile-time errors if a sealed class is specified as the base class of another class.
A sealed class cannot also be an abstract class.
.Net framework cliams that, some run-time optimizations can make calling sealed class members slightly faster.