Creates and starts a System.Threading.Tasks.Task.
- action
- The action delegate to execute asynchronously.
- state
- An object containing data to be used by the action delegate.
- cancellationToken
- The TaskFactory.CancellationToken that will be assigned to the new task.
- creationOptions
- A TaskCreationOptions value that controls the behavior of the created System.Threading.Tasks.Task
- scheduler
- The System.Threading.Tasks.TaskScheduler that is used to schedule the created System.Threading.Tasks.Task.
The started System.Threading.Tasks.Task.
Calling StartNew is functionally equivalent to creating a Task using one of its constructors and then calling Task.Start to schedule it 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.