Export (0) Print
Expand All

TaskStatus Enumeration

Represents the current stage in the lifecycle of a Task.

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

'Declaration
Public Enumeration TaskStatus

Member nameDescription
Supported by Portable Class LibraryCanceledThe task acknowledged cancellation by throwing an OperationCanceledException with its own CancellationToken while the token was in signaled state, or the task's CancellationToken was already signaled before the task started executing. For more information, see Task Cancellation.
Supported by Portable Class LibraryCreatedThe task has been initialized but has not yet been scheduled.
Supported by Portable Class LibraryFaultedThe task completed due to an unhandled exception.
Supported by Portable Class LibraryRanToCompletionThe task completed execution successfully.
Supported by Portable Class LibraryRunningThe task is running but has not yet completed.
Supported by Portable Class LibraryWaitingForActivationThe task is waiting to be activated and scheduled internally by the .NET Framework infrastructure.
Supported by Portable Class LibraryWaitingForChildrenToCompleteThe task has finished executing and is implicitly waiting for attached child tasks to complete.
Supported by Portable Class LibraryWaitingToRunThe task has been scheduled for execution but has not yet begun executing.

The Task.Status property returns a member of the TaskStatus enumeration to indicate the task's current status.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Portable Class Library

Supported in: Portable Class Library

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft