I have tried to understand but still not sure. If there is a constructor in the base class, the derived classes will always call it? I know they can override it (not correct term here, I know – I mean add code to their constructors) but I assume if the constructor is defined in the base class, the derived ones will always call it. Is that true?
Share
Yes, if there is a parameterless constructor it will always be called. If there is more than one constructor, you can choose which one to call with the
basekeyword:If there is no parameterless constructor, you will be forced to do this: