TimeoutException 构造函数

定义

初始化 TimeoutException 类的新实例。

重载

TimeoutException()

初始化不带消息文本的 TimeoutException 类的新实例。

TimeoutException(String)

使用指定的消息文本初始化 TimeoutException 类的新实例。

TimeoutException(SerializationInfo, StreamingContext)
已过时.

用指定的序列化信息和上下文初始化 TimeoutException 类的新实例。

TimeoutException(String, Exception)

使用指定的消息文本和内部异常初始化 TimeoutException 类的新实例。

TimeoutException()

Source:
TimeoutException.cs
Source:
TimeoutException.cs
Source:
TimeoutException.cs
Source:
TimeoutException.cs

初始化不带消息文本的 TimeoutException 类的新实例。

public:
 TimeoutException();
public TimeoutException ();
Public Sub New ()

适用于

TimeoutException(String)

Source:
TimeoutException.cs
Source:
TimeoutException.cs
Source:
TimeoutException.cs
Source:
TimeoutException.cs

使用指定的消息文本初始化 TimeoutException 类的新实例。

public:
 TimeoutException(System::String ^ message);
public TimeoutException (string? message);
public TimeoutException (string message);
new System.ServiceProcess.TimeoutException : string -> System.ServiceProcess.TimeoutException
Public Sub New (message As String)

参数

message
String

描述异常的类型或源的文本。

适用于

TimeoutException(SerializationInfo, StreamingContext)

Source:
TimeoutException.cs
Source:
TimeoutException.cs
Source:
TimeoutException.cs
Source:
TimeoutException.cs

注意

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

用指定的序列化信息和上下文初始化 TimeoutException 类的新实例。

protected:
 TimeoutException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected TimeoutException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected TimeoutException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.ServiceProcess.TimeoutException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.ServiceProcess.TimeoutException
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.ServiceProcess.TimeoutException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.ServiceProcess.TimeoutException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

参数

info
SerializationInfo

包含有关所引发异常的序列化对象数据的 SerializationInfo

context
StreamingContext

StreamingContext,它包含关于源或目标的上下文信息。

属性

例外

info 参数为 null

类名为 null 或者 HResult 为零 (0)。

适用于

TimeoutException(String, Exception)

Source:
TimeoutException.cs
Source:
TimeoutException.cs
Source:
TimeoutException.cs
Source:
TimeoutException.cs

使用指定的消息文本和内部异常初始化 TimeoutException 类的新实例。

public:
 TimeoutException(System::String ^ message, Exception ^ innerException);
public TimeoutException (string? message, Exception? innerException);
public TimeoutException (string message, Exception innerException);
new System.ServiceProcess.TimeoutException : string * Exception -> System.ServiceProcess.TimeoutException
Public Sub New (message As String, innerException As Exception)

参数

message
String

描述异常的类型或源的文本。

innerException
Exception

引发当前异常的异常。

另请参阅

适用于