Microsoft
70-511 · Question #20
70-511 Question #20: Real Exam Question with Answer & Explanation
Sign in or unlock 70-511 to reveal the answer and full explanation for question #20. The question stem and answer options stay visible for context.
Question
You develop a Windows Presentation Foundation (WPF) application. This application is used to output data trends to customer service representatives. A data trend analysis is performed in a function named UpdateTrendData. The trend analysis is a long-running process. The application contains the following code segment. Class MainWindow: Window { private void UpdateData(object arg) { double data = UpdateTrendData(); ... } } UpdateData is currently invoked on the UI thread when the form is first displayed. You need to process the data in a manner that does not cause the UI to freeze. What should you do?
Options
- AUse ThreadPool.SetMaxThreads(2, 2) and invoke UpdateData.
- BUse ThreadPool.QueueUserWorkItem to invoke UpdateData.
- CUse this.Dispatcher.Beginlnvoke to invoke UpdateData passing in the priority of Normal.
- DUse this.Dispatcher.BeginInvoke to invoke UpdateData passing in the priority of Background.
Unlock 70-511 to see the answer
You've previewed enough free 70-511 questions. Unlock 70-511 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.