Beispiel #1
0
        public void AddEmployee(Employee employee)
        {
            if (employee == null)
            {
                throw new ArgumentOutOfRangeException("employee cannot be null");
            }

            this.employees.Add(employee);
            Console.WriteLine("Employee added");
        }
Beispiel #2
0
 public void RemoveEmployee(Employee employee)
 {
     if (this.employees.Remove(employee))
     {
         Console.WriteLine("Employee removed");
     }
     else
     {
         Console.WriteLine("No such employee");
     }
 }