private void SendAnElevator(Elevator ElevatorToSend, Floor TargetFloor) { ElevatorToSend.AddNewFloorToTheList(TargetFloor); //Create new thread and send the elevator ThreadPool.QueueUserWorkItem(delegate { ElevatorToSend.PrepareElevatorToGoToNextFloorOnTheList(); }); }
private static void SendAnElevator(Elevator elevator, Floor floor) { elevator.AddNewFloorToTheList(floor); ThreadPool.QueueUserWorkItem(delegate { elevator.PrepareElevatorToGoToNextFloorOnTheList(); }); }
private void SendAnElevator(Elevator ElevatorToSend, Floor TargetFloor) { ElevatorToSend.AddNewFloorToTheList(TargetFloor); //Create new thread and send the elevator ThreadPool.QueueUserWorkItem(delegate { ElevatorToSend.PrepareElevatorToGoToNextFloorOnTheList(); }); }