Suppose i have the code snippet as follows : ( clarification purpose/not well formed)
class Employee
{
#region fields
protected string _empID;
protected string _empName;
protected readonly string _ssn;
#endregion
public Employee(){}
public Employee(string _empID,string _empName,string _ssn)
{
this._empID =_empID;
this._empName=_empName;
this._ssn = _ssn;
}
}
class Manager : Employee
{
private string _branchID;
public Manager(int _branchID):base(string _empID,string _empName,string _ssn)
{
this._branchID=_branchID;
}
}
static void Main()
{
Manager mgr = new Manager("1","sam","xxx","Branch1");
}
Using base keyword I am invoking parent class constructor .
In this case how the inheritance is organized? I have some bad assumptions as follow:
As Manager is derived from Employee, Manager class is filled with (empID,empName,ssn)
-----------------
Manager
-----------------
empID
empName
ssn
branchID
step 1 : constructor invoking :base( "1","sam","xxx")
step 2 : base class(Employee) constructor fills the derived class filed (empID,empName,ssn)
step 3 : branchID is assigned by derived class constructor
.......
My question is