Edit

Share via


TimeoutException Constructors

Definition

Initializes a new instance of the TimeoutException class.

Overloads

TimeoutException()

Initializes a new instance of the TimeoutException class with no message text.

TimeoutException(String)

Initializes a new instance of the TimeoutException class with the specified message text.

TimeoutException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the TimeoutException class with the specified serialization information and context.

TimeoutException(String, Exception)

Initializes a new instance of the TimeoutException class with the specified message text and inner exception.

TimeoutException()

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

Initializes a new instance of the TimeoutException class with no message text.

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

Applies to

TimeoutException(String)

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

Initializes a new instance of the TimeoutException class with the specified message text.

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)

Parameters

message
String

Text that describes the type or source of the exception.

Applies to

TimeoutException(SerializationInfo, StreamingContext)

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

Caution

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

Initializes a new instance of the TimeoutException class with the specified serialization information and context.

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)

Parameters

info
SerializationInfo

The SerializationInfo that holds the serialized object data about the exception being thrown.

context
StreamingContext

The StreamingContext that contains contextual information about the source or destination.

Attributes

Exceptions

The info parameter is null.

The class name is null or HResult is zero (0).

Applies to

TimeoutException(String, Exception)

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

Initializes a new instance of the TimeoutException class with the specified message text and inner exception.

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)

Parameters

message
String

Text that describes the type or source of the exception.

innerException
Exception

The exception that caused the current exception.

See also

Applies to