static void Main(string[] args) { Employee E1 = new FullTimeEployee(); //Focus on this line E1.Name = "Ujjwal"; E1.LastName = "Vaish"; E1.PrintFullName(); //Parent class method is accessed hee FullTimeEployee E2 = new FullTimeEployee(); E2.Name = "Apoorv"; E2.LastName = "Vaish"; E2.PrintFullName(); //Deived class is accessed here , method hiding Console.ReadKey(); }
static void Main(string[] args) { Employee E1 = new FullTimeEployee(); //Focus on this line E1.Name = "Ujjwal"; E1.LastName = "Vaish"; E1.PrintFullName(); //Parent class method is accessed hee FullTimeEployee E2 = new FullTimeEployee(); E2.Name = "Apoorv"; E2.LastName = "Vaish"; E2.PrintFullName(); //Deived class is accessed here , method hiding Console.ReadKey(); }