private static void printDetails(Employee employee) { Console.WriteLine("Employee Name :" + employee.Name); Console.WriteLine("Employee Designation :" + employee.Desgination); Console.WriteLine("Employee Dob :" + employee.DOB); Console.WriteLine("Employee Basic :" + employee.Basic); Console.WriteLine("Employee PA :" + employee.Pa); if (employee.GetType().Equals(typeof(Manager))) { Console.WriteLine("Employee HRA :" + employee.HRA); } Console.WriteLine("Employee Salary :" + employee.CalculateSalary()); Console.WriteLine("Employee Age :" + employee.CalculateAge()); Console.WriteLine(); }