C# Programing How a derived class that inherits attributes and behaviors from a base class? Problems with Protected access modifier. Solution A derived class can override a base class member only if base class member is declared as virtual or abstract. The derived member must use override keyword to explicitly indicate that the method is intended to participate in virtual invocation. Protected variables should be avoided because of the following reasons: 1)They tend to lead to some issues. Protected variables generally have some intrinsic invariance associated with them or else they would be public Inheritors then need to maintain those properties, which people can violate. 2)If the base class makes too many assumptions about the protected member, or the inheritor is too flexible with the behavior of the class, it can lead to the base class behavior being modified by that extension which leads to inheritance for extension rather than composition. Infact tends to lead to tighter coupling, more violations..