private IEnumerable GetEmployeeType(Employee.TypeEnum type) { foreach (var employee in employees) { if (employee.Type == type) yield return employee; } }
public void Add(string name, Employee.TypeEnum type) { employees.Add(new Employee { Name = name, Type = type }); }