A class should have only one responsibility
Responsibility is the work that has been assigned to the class. In the SOLID set of principles, the S stands for the SRP. When applied to a class, the SRP states that the class must only work on a single aspect of the feature being implemented. The responsibility of that single aspect should be fully encapsulated within the class. Therefore, you should never apply more than one responsibility to a class.
Let’s look at an example to understand why:
public class MultipleResponsibilities{ Â Â Â Â public string DecryptString( Â Â Â Â Â Â Â Â string text, Â Â Â Â Â Â Â Â SecurityAlgorithm algorithm) Â Â Â Â { Â Â Â Â Â Â Â Â // ...implementation... Â Â Â Â } Â Â Â Â public string EncryptString( Â Â Â Â Â Â Â Â string text, Â Â Â ...