Invoke Method (Action[])

Task Parallel System.Threading

Executes each of the provided actions, possibly in parallel.

Namespace:  System.Threading.Tasks
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Public Shared Sub Invoke ( _
	ParamArray actions As Action() _
)
C#
public static void Invoke(
	params Action[] actions
)

Parameters

actions
Type: array< System..::.Action >[]()[]
An array of Actions to execute.

Remarks

This method can be used to execute a set of operations, potentially in parallel. No guarantees are made about the order in which the operations execute or whether they execute in parallel. This method does not return until each of the provided operations has completed, regardless of whether completion occurs due to normal or exceptional termination.

Exceptions

ExceptionCondition
System..::.ArgumentNullExceptionThe exception that is thrown when the actions argument is null.
System..::.ArgumentExceptionThe exception that is thrown when the actions array contains a null element.
System..::.AggregateExceptionThe exception that is thrown when any action in the actions array throws an exception.

See Also