示例#1
0
        // A Constructor:
        public Employees()
        {
            // Calculate the employee's number:
            counter++;
            NumberOfEmployees = counter;
            ID = counter;

            //Console.WriteLine($"Counter {counter}");

            employeePublisher = new EmployeePublisher();
            employeePublisher.EmployeeEvent += DelegateEventEmployeeAdded;
        }
 public EmployeeAddedSubscriber(EmployeePublisher pub)
 {
     pub.EmployeeEvent = HandleAddedEmployee;
 }