Let's say that there is an Employee base class that looks like this
public Employee(string name, int id, float pay) : this(name, 0, id, pay, "") { } public Employee(string name, int age, int id, float pay, string ssn) {
And the Manager class that inherits from the Employee type constructor
public Manager(string fullName, int age, int empID, float currPay, string ssn, int numbOfOpts) : base(fullName, age, empID, currPay, ssn) { . StockOptions = numbOfOpts; }
As far as I know, the this keyword is similar to the base keyword, it applies only to constructors of the same class. My biggest question is that, reading the manual, he says that if you do not use the chain, the construction of the Manager object will include seven hits. Since the Manager inherits from Employees, does this mean that each manager object is โbornโ as an Employee, and then becomes a Manager later? And after this is a manager, you have only two fields to add instead of seven?
source share