From the course: Advanced C#: Object-Oriented Programming
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Challenge: Add static members to employee - C# Tutorial
From the course: Advanced C#: Object-Oriented Programming
Challenge: Add static members to employee
(upbeat music) - [Instructor] Now that we've learned about static class members, let's put them to use in a coding challenge. For this challenge, we're going to update the previous coding challenge by adding a couple of static members to our Employee class. So if you haven't already done that previous challenge, I suggest going back and trying it, but that's not required. You should be able to handle this challenge independently of the previous one. So I'm going to open up the code for the program file here in the editor so you can see how your code will be called. The first change that we're going to make is the addition of this EmployeeCount property, and notice that it's static on the Employee class. Each time an employee object is created, this property will increase the count of the number of instances. The second change we're going to make is that the IED property will no longer be initialized by the test code.…