I am beginner programmer and I have problem in this code. When I run the code, it stuck at
monthly[i].ID = Console.ReadLine();
The error says : system.nullreferenceexception 'object reference not set to an instance of an object.' At this program I have class MonthlyEmployee and DailyEmployee which inheritance of Employee. I want to access the properties with looping (do while). So, I add this outside the looping.
MonthlyEmployee[] monthly = new MonthlyEmployee[10];
List<Employee> listemployee = new List<Employee>();
How I can fix this? Really appreciate your help.