You were asked to use the BackgroundWorker component to do an asynchronous task. What should you do to define the signature of the method that will contain the code to perform the asynchronous task?
A.
You should create a method that matches the ThreadStart delegate’s signature.
B.
You should create a method that matches the AsyncCallback delegate’s signature.
C.
You should create a method that matches the ParameterizedThreadStart delegate’s signature.
D.
You should create a method that matches the DoWorkEventHandler delegate’s signature.
Explanation:
You should create a method that matches the DoWorkEventHandler delegate’s signature. The BackgroungWorker allows you to do jobs in a background thread quite then the interface thread.Incorrect Answers:
A: The ThreadStart allows you to define a method for executing codes in separate threads. You must in this case avoid creating a method that matches the ThreadStart signature.
B: The AsyncCallback allows you to define a method that represents an asynchronous operation’s callback. You must in this case avoid creating a method that matches the AsyncCallback signature.
C: The ParameterizedThreadStart allows you to define a method that represents an asynchronous operation’s callback. You must in this case avoid creating a method that matches the AsyncCallback signature.