Free mag vol1 | Page 285

CHAPTER 6  UNDERSTANDING INHERITANCE AND POLYMORPHISM } The first issue with this approach is that if you defined any property as read-only (for example, the SocialSecurityNumber property), you are unable to assign the incoming string parameter to this field, as seen in the final code statement of this custom constructor. The second issue is that you have indirectly created a rather inefficient constructor, given the fact that under C#, unless you say otherwise, the default constructor of a base class is called automatically before the logic of the derived constructor is executed. After this point, the current implementation accesses numerous public properties of the Employee base class to establish its state. Thus, you have really made seven hits (five inherited properties and two constructor calls) during the creation of a Manager object! To help optimize the creation of a derived class, you will do well to implement your subclass constructors to explicitly call an appropriate custom base class const 'V7F