TaskCanceledException Class

Definition

Represents an exception used to communicate task cancellation.

public class TaskCanceledException : OperationCanceledException
Inheritance

Inherited Members

System.Exception

System.Object

System.OperationCanceledException

Constructors

TaskCanceledException()

Initializes a new instance of the TaskCanceledException class with a system-supplied message that describes the error.

TaskCanceledException(String)

Initializes a new instance of the TaskCanceledException class with a specified message that describes the error.

TaskCanceledException(Task)

Initializes a new instance of the TaskCanceledException class with a reference to the Task that has been canceled.

TaskCanceledException(SerializationInfo, StreamingContext)

Initializes a new instance of the TaskCanceledException class with serialized data.

TaskCanceledException(String, Exception)

Initializes a new instance of the TaskCanceledException class with a specified error message and a reference to the inner exception that is the cause of this exception.

Properties

Task

Gets the task associated with this exception.

Thread Safety

The Task property is thread-safe and may be used from multiple threads concurrently.