TaskFactory<TResult>.StartNew Method (Func<Object, TResult>, Object, CancellationToken, TaskCreationOptions, TaskScheduler)
Creates and starts a task.
Assembly: mscorlib (in mscorlib.dll)
public Task<TResult> StartNew( Func<object, TResult> function, object state, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler )
A function delegate that returns the future result to be available through the task.
An object that contains data to be used by the function delegate.
The cancellation token that will be assigned to the new task.
One of the enumeration values that controls the behavior of the created task.
The task scheduler that is used to schedule the created task.
However, unless creation and scheduling must be separated, StartNew is the recommended approach for both simplicity and performance.
Available since 4.5
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Available since 5.0
Windows Phone Silverlight
Available since 8.0
Available since 8.1