Task Property

Task Parallel System.Threading

Gets the task associated with this exception.

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

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Task As Task
C#
public Task Task { get; }

Remarks

It is permissible for no Task to be associated with a TaskCanceledException, in which case this property will return null.

See Also