public:
 TaskCanceledException(System::String ^ message);
public TaskCanceledException (string message);
public TaskCanceledException (string? message);
new System.Threading.Tasks.TaskCanceledException : string -> System.Threading.Tasks.TaskCanceledException
Public Sub New (message As String)
public:
 TaskCanceledException(System::Threading::Tasks::Task ^ task);
public TaskCanceledException (System.Threading.Tasks.Task task);
public TaskCanceledException (System.Threading.Tasks.Task? task);
new System.Threading.Tasks.TaskCanceledException : System.Threading.Tasks.Task -> System.Threading.Tasks.TaskCanceledException
Public Sub New (task As Task)
protected:
 TaskCanceledException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected TaskCanceledException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Threading.Tasks.TaskCanceledException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Threading.Tasks.TaskCanceledException
Protected Sub New (info As SerializationInfo, context As StreamingContext)
public:
 TaskCanceledException(System::String ^ message, Exception ^ innerException);
public TaskCanceledException (string message, Exception innerException);
public TaskCanceledException (string? message, Exception? innerException);
new System.Threading.Tasks.TaskCanceledException : string * Exception -> System.Threading.Tasks.TaskCanceledException
Public Sub New (message As String, innerException As Exception)

因前一个异常而直接引发的异常应在 InnerException 属性中包含对前一个异常的引用。 InnerException 属性将返回传递给构造函数的同一值;如果 InnerException 属性不向构造函数提供内部异常值,则返回 null

下表显示了 TaskCanceledException 实例的初始属性值。

properties
public:
 TaskCanceledException(System::String ^ message, Exception ^ innerException, System::Threading::CancellationToken token);
public TaskCanceledException (string? message, Exception? innerException, System.Threading.CancellationToken token);
public TaskCanceledException (string message, Exception innerException, System.Threading.CancellationToken token);
new System.Threading.Tasks.TaskCanceledException : string * Exception * System.Threading.CancellationToken -> System.Threading.Tasks.TaskCanceledException
Public Sub New (message As String, innerException As Exception, token As CancellationToken)