Microsoft
70-484 · Question #18
You need to modify the GetContactsCompleted event handler to prevent the exception. Which code segment should you use to replace line CS32?
The correct answer is D. Option D. An exception is being thrown in the GetContactsCompleted event handler when the retrieved email address is assigned to the RecipientsTextBlock control. The exception message states: "The application called an interface that was marshalled for a different thread."
Program with C#
Question
You need to modify the GetContactsCompleted event handler to prevent the exception. Which code segment should you use to replace line CS32?
Exhibit
Options
- AOption A
- BOption B
- COption C
- DOption D
How the community answered
(58 responses)- A14% (8)
- B9% (5)
- C3% (2)
- D74% (43)
Explanation
- An exception is being thrown in the GetContactsCompleted event handler when the retrieved email address is assigned to the RecipientsTextBlock control. The exception message states: "The application called an interface that was marshalled for a different thread."
Topics
#event handlers#exception handling#async patterns#ContactPicker
Community Discussion
No community discussion yet for this question.
