Microsoft
70-518 · Question #28
70-518 Question #28: Real Exam Question with Answer & Explanation
Sign in or unlock 70-518 to reveal the answer and full explanation for question #28. The question stem and answer options stay visible for context.
Question
You are updating a Windows desktop client application that was created by using Microsoft .NET Framework 4 and Microsoft Visual Studio 2010. The application displays data derived from several database queries. The display takes a long time to update. The application currently uses a BackgroundWorker thread and a Parallel.ForEach statement on that thread. Users have requested a modification to the program that would allow them to interrupt the display of data and begin processing a new and different query. You decide to provide a new Stop button on the user interface (UI) to allow the user to terminate the current data display and initiate the new query. The main UI thread must be notified when the current data processing is terminated so that the new query can be started. You need to implement the Stop button event handler. What should you do?
Options
- AUse the DoWork handler of the worker thread and test a shared status value.
- BUse the DoWork handler of the worker thread and test a shared status value.
- CUse the DoWork handler of the worker thread and test a shared status value.
- DUse a CancelAsync() function to cancel the worker thread.
Unlock 70-518 to see the answer
You've previewed enough free 70-518 questions. Unlock 70-518 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.