mscorlib 2.0.0.0 4.0.0.0 System.SystemException System.Runtime.InteropServices.ComVisible(true)

If the task that was canceled had an associated cancellation token, it is returned by the property, and the property of the token is set to true.

The exception that is thrown in a thread upon cancellation of an operation that the thread was executing.

- Constructor
  2.0.0.0
  4.0.0.0

  This constructor initializes the property of the new instance to a system-supplied message that describes the error, such as "The operation was canceled." This message takes into account the current system culture.

  The following table shows the initial property values for an instance of .

  Property

  Value

  A null reference (Nothing in Visual Basic).

  The localized error message string.

  A cancellation token created in the non-canceled state.

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

- Constructor
  2.0.0.0
  4.0.0.0

  The content of is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

  The following table shows the initial property values for an instance of .

  Property

  Value

  A null reference (Nothing in Visual Basic).

  The error message string.

  A cancellation token created in the non-canceled state.

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

  A that describes the error.
- Constructor
  4.0.0.0

  This constructor initializes the property of the new instance to a system-supplied message that describes the error, such as "The operation was canceled." This message takes into account the current system culture.

  The following table shows the initial property values for an instance of .

  Property

  Value

  A null reference (Nothing in Visual Basic).

  The localized error message string.

  .

  Initializes a new instance of the class with a cancellation token.

  A cancellation token associated with the operation that was canceled.
- Constructor
  2.0.0.0
  4.0.0.0

  This constructor is called during deserialization to reconstitute the exception object transmitted over a stream. For more information, see XML and SOAP Serialization

  Initializes a new instance of the class with serialized data.

  The object that holds the serialized object data.
  The contextual information about the source or destination.
- Constructor
  2.0.0.0
  4.0.0.0

  The content of is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

  An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the property. The property returns the same value that is passed into the constructor, or null if the property does not supply the inner exception value to the constructor.

  The following table shows the initial property values for an instance of .

  Property Type

  Condition

  .

  .

  A cancellation token created in the non-canceled state.

  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.

  The error message that explains the reason for the exception.
  The exception that is the cause of the current exception. If the parameter is not null, the current exception is raised in a catch block that handles the inner exception.
- Constructor
  4.0.0.0

  The content of is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

  The following table shows the initial property values for an instance of .

  Property

  Value

  A null reference (Nothing in Visual Basic).

  .

  .

  Initializes a new instance of the class with a specified error message and a cancellation token.

  The error message that explains the reason for the exception.
  A cancellation token associated with the operation that was canceled.
- Constructor
  4.0.0.0

  The content of is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

  An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the property. The property returns the same value that is passed into the constructor, or null if the property does not supply the inner exception value to the constructor.

  The following table shows the initial property values for an instance of .

  The following table shows the initial property values for an instance of .

  Property Type

  Condition

  .

  .

  .

  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 a cancellation token.

  The error message that explains the reason for the exception.
  The exception that is the cause of the current exception. If the parameter is not null, the current exception is raised in a catch block that handles the inner exception.
  A cancellation token associated with the operation that was canceled.
- Property
  4.0.0.0
  System.Threading.CancellationToken To be added.

  If the token is associated with a canceled operation, the property of the token returns true.

  Gets a token associated with the operation that was canceled.