I have a library base class (Controller
) and three sub-classes that inherit from Controller
(Sensor
, Output
, and Enviro
Well, a private member won't be visible to your derived classes. You would need a protected member or property for that. Within the class, you can just refer to it as errorDescriptions or this.errorDescriptions.
I'd be extremely wary of having a static, protected member variable that isn't thread safe and can be mutated by derived classes. That's just asking for trouble.