System.Threading.Tasks.TaskFactory.ContinueWhenAll Method

Creates a continuation task that starts when a set of specified tasks has completed.

Syntax

public Task ContinueWhenAll (Task[] tasks, Action<Task[]> continuationAction)

Parameters

tasks
The array of tasks from which to continue.
continuationAction
The action delegate to execute when all tasks in the tasks array have completed.

Returns

The new continuation task.

Remarks

The TaskFactory.ContinueWhenAll(Task[], Action<Task[]>) method executes the continuationAction delegate when all tasks in the tasks array have completed, regardless of their completion status.

Exceptions thrown by tasks in the tasks array are not available to the continuation task through structured exception handling. You can determine which exceptions were thrown by examining the Task.Exception property of each task in the tasks array. To use structured exception handling to handle exceptions thrown by tasks in the tasks array, call the Task.WaitAll(Task[]) method.

Requirements

Namespace: System.Threading.Tasks
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0