What should you do?

You use the Task.Run() method to launch a long-running data processing operation. The data processing operation often fails in times of heavy network congestion.

If the data processing operation fails, a second operation must clean up any results of the first operation.

You need to ensure that the second operation is invoked only if the data processing operation throws an unhandled exception.

What should you do?
A . Create a task within the operation, and set the Task.StartOnError property to true.
B . Create a TaskFactory object and call the ContinueWhenAll() method of the object.
C . Create a task by calling the Task.ContinueWith() method.
D . Use the TaskScheduler class to create a task and call the TryExecuteTask() method on the class.

Answer: C

Explanation:

Task.ContinueWith – Creates a continuation that executes asynchronously when the target Task

completes.The returned Task will not be scheduled for execution until the current task has completed, whether it completes due to running to completion successfully, faulting due to an unhandled exception, or exiting out early due to being canceled.

http://msdn.microsoft.com/en-us/library/dd270696.aspx

Latest 70-483 Dumps Valid Version with 288 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments