Which two code segment should you use?

You want to execute an event handler asynchronously from a Windows Form. You need to execute a method named WorkHandler by using an instance of the BackgroundWorker component named bgwExecute. Which two code segment should you use? (Each correct answer presents part of the solution. Choose two.)

You want to execute an event handler asynchronously from a Windows Form. You need to execute a method named WorkHandler by using an instance of the BackgroundWorker component named bgwExecute. Which two code segment should you use? (Each correct answer presents part of the solution. Choose two.)

A.
EventHandler work = new EventHandler(WorkHandler);

B.
ThreadStart work = new ThreadStart(WorkHandler);

C.
bgwExecute.DoWork += new Do WorkEventHandler(WorkHandler);

D.
bgwExecute.RunWorkerAsync();

E.
bgwExecute.RunWorkerAsync(Work);



Leave a Reply 0

Your email address will not be published. Required fields are marked *