I am trying to program a simple employee registry and I want to use a generic List to "save" the persons I am creating.
The manager class got one constructor and one method (see below). The constructor creates the List and the method adds to it, or should be adding to it. The problem is that I cannot do it like below because Visual Studio says that employeeList does not exist in the current context. How am I else going to write this?
public EmployeeManager()
{
List<string> employeeList = new List<string>();
}
public void AddEmployee()
{
employeeList.add("Donald");
}