TaskFactory<TResult>.StartNew Method (Func<Object, TResult>, Object, CancellationToken, TaskCreationOptions, TaskScheduler)
Creates and starts a .
Assembly: mscorlib (in mscorlib.dll)
public Task<TResult> StartNew( Func<Object, TResult> function, Object state, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler )
- Type: System.Func<Object, TResult>
A function delegate that returns the future result to be available through the .
- Type: System.Object
An object containing data to be used by the function delegate.
- Type: System.Threading.CancellationToken
The CancellationToken that will be assigned to the new task.
- Type: System.Threading.Tasks.TaskCreationOptions
A TaskCreationOptions value that controls the behavior of the created .
The CancellationTokenSource that created cancellationToken has already been disposed.
The exception that is thrown when the function argument is null.
The exception that is thrown when the scheduler argument is null.
The exception that is thrown when the creationOptions argument specifies an invalid TaskCreationOptions value.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.