class TaskCanceledException

in global :: System . Threading . Tasks

Represents an exception used to communicate task cancellation.


public TaskCanceledException( string message )

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

  • message The message that describes the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

public TaskCanceledException( string message, Exception innerException )

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

  • message The message that describes the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
  • innerException The exception that is the cause of the current exception. If the parameter is not , the current exception is raised in a block that handles the inner exception.

public TaskCanceledException( string message, Exception innerException, CancellationToken token )

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

  • message The error message that explains the reason for the exception.
  • innerException The exception that is the cause of the current exception.
  • token The cancellation token that triggered the cancellation.

public TaskCanceledException( Task task )

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

  • task A task that has been canceled.

public Task Task { get; }

Gets the task associated with this exception.

  • Returns A reference to the that is associated with this exception.

public Exception InnerException { get; }

😔 No documentation found.

😔 No documentation found.

public string Source { get; set; }

😔 No documentation found.

public void GetObjectData( SerializationInfo info, StreamingContext context )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public IDictionary Data { get; }

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public string StackTrace { get; }

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public TaskCanceledException( )

😔 No documentation found.

public string Message { get; }

😔 No documentation found.

public CancellationToken CancellationToken { get; }

😔 No documentation found.

public Exception GetBaseException( )

😔 No documentation found.

public int HResult { get; set; }

😔 No documentation found.