Task.IsCanceled property

Value that indicates whether the task completed execution due to being canceled.

public bool IsCanceled { get; }

See Also