Microsoft
70-518 · Question #23
You are designing an application by using Windows Presentation Foundation (WPF) and Microsoft .NET Framework 4. The user interface (UI) tier of the application will be implemented in WPF. The middle…
The correct answer is A. Use an asynchronous worker thread to call ProcessData. See the full explanation below for the reasoning.
Question
You are designing an application by using Windows Presentation Foundation (WPF) and Microsoft .NET Framework 4. The user interface (UI) tier of the application will be implemented in WPF. The middle tier of the application is implemented by using an existing COM component. The middle tier contains a long-running method named ProcessData. You need to ensure that users can continue to use the UI while ProcessData is running. What should you do?
Options
- AUse an asynchronous worker thread to call ProcessData.
- BUse the Invoke method of the Dispatcher class to call ProcessData.
- CCall the Run method of the Dispatcher class before invoking ProcessData.
- DCall the DoEvents method of the Application class before invoking ProcessData.
How the community answered
(23 responses)- A83% (19)
- B9% (2)
- C4% (1)
- D4% (1)
Community Discussion
No community discussion yet for this question.