PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

You want to execute an event handler asynchronously from a Windows Form. You need to write code that uses the BackgroundWorker component named bgwExecute to execute the WorkHandler method. Which code segment should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
Dim work As New EventHandler(AddressOf WorkHandler)bgwExecute.RunWorkerAsync(work)

B.
Dim tsBackground As New ThreadStart(AddressOf WorkHandler)bgwExecute.ReportProgress(0, tsBackground)

C.
Dim tsBackground As New ThreadStart(AddressOf
WorkHandler)bgwExecute.RunWorkerAsync(tsBackground)

D.
AddHandler bgwExecute.DoWork, AddressOf WorkHandlerbgwExecute.RunWorkerAsync()


Leave a Reply