Which two code segments 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 segments 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 segments 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 DoWorkEventHandler(WorkHandler);

D.
bgwExecute.RunWorkerAsync();

E.
bgwExecute.RunWorkerAsync(work);



Leave a Reply 0

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