System.Threading.Tasks.TaskFactory.StartNew Method

Creates and starts a task.

Syntax

public Task StartNew (Action action)

Parameters

action
The action delegate to execute asynchronously.

Returns

The started task.

Remarks

Calling TaskFactory.StartNew(Action) is functionally equivalent to creating a task by using one of its constructors, and then calling the Task.Start method to schedule the task for execution. Starting with the net_v45, you can use the erload:System.Threading.Tasks.Task.Run method with an stem.Action object as a quick way to call erload:System.Threading.Tasks.TaskFactory.StartNew with default parameters. For more information and code examples, see tp://blogs.msdn.com/b/pfxteam/archive/2011/10/24/10229468.aspx in the Parallel Programming with .NET blog.

Requirements

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