Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
TaskStatus Enumeration

TaskStatus Enumeration

Represents the current stage in the lifecycle of a Task.

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

public enum 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

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8

Portable Class Library

Supported in: Portable Class Library
© 2015 Microsoft