Task.Start Method (TaskScheduler)

 

Starts the Task, scheduling it for execution to the specified TaskScheduler.

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

Public Sub Start (
	scheduler As TaskScheduler
)

Parameters

scheduler
Type: System.Threading.Tasks.TaskScheduler

The TaskScheduler with which to associate and execute this task.

Exception Condition
ArgumentNullException

The scheduler argument is null.

InvalidOperationException

The Task is not in a valid state to be started. It may have already been started, executed, or canceled, or it may have been created in a manner that doesn't support direct scheduling.

ObjectDisposedException

The Task instance has been disposed.

TaskSchedulerException

The scheduler was unable to queue this task.

A task may only be started and run only once. Any attempts to schedule a task a second time will result in an exception.

For information on handling exceptions thrown by task operations, see Exception Handling (Task Parallel Library).

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 5.0
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Return to top
Show: