.NET Framework Class Library |
Parallel..::.Invoke Method (array<Action>[]()[]) |
Parallel Class See Also Send Feedback |
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
Exception | Condition |
---|---|
System..::.ArgumentNullException | The exception that is thrown when the actions argument is null. |
System..::.ArgumentException | The exception that is thrown when the actions array contains a null element. |
System..::.AggregateException | The exception that is thrown when any action in the actions array throws an exception. |