static void Main(string[] args) { HR hr = new HR(1, "abc", "HR", 4, "5 january 2014", 100000, 8000); Developer developer = new Developer(1, "xyz", "developer", 5, "5 january 2013", 100000, 8000); Console.WriteLine("Salary of HR=" + hr.Salary()); Console.WriteLine("Salary of Developer=" + developer.Salary()); }
static void Main(string[] args) { Employee emp_1 = new HR(007, "Reeves", "developer", 8000, 4, DateTime.Parse("26/11/2016")); Console.WriteLine(emp_1.Salary()); Employee emp_2 = new Developer(009, "Keanu", "developer", 8000, 5, DateTime.Parse("11/09/2015")); Console.WriteLine(emp_2.Salary()); }