You as the developer of Domain.com use a client computer named Certkiller -WS113 as developing collateral.
You are busy using a BackgroundWorker component to execute an asynchronous operation.
The job of the background thread is to call the ReportProgress method to update the foreground thread.
You have handled the ProgressChanged event and set the Value property of a ProgressBar.
The problem is that the ProgressBar display by no means gets updated. During the investigation you find out that the event handler that works with the ProgressChanged event never gets called.
What should you do to make sure that the event handler gets called?
A.
You should call the ReportProgress method in the foreground thread.
B.
You should set the WorkerReportsProgress property to True.
C.
You should set the BackgroundWorker component to the value of the Site property returned from the ProgressBar control.
D.
You should set the BackgroundWorker component to the value of the Site property returned from Form control that host the component.
Explanation:
The WorkerReportsProgress property shows whether the BackgroundWorker component should raise the ProgressChanged event when the backgroung thread calls the ReportProgress method.Incorrect Answers:
A: The BackgroundWorker should call the ReportProgress. You should not put it to the foreground.
C, D: The Site property should not be changed. It defined the binding between a control or component and its associate container.