TimeoutException Constructors
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the TimeoutException class.
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. |
- 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
.NET 10 (package-provided) 和其他版本
产品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
- 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
.NET 10 (package-provided) 和其他版本
产品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
- 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);
[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);
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}")>]
new System.ServiceProcess.TimeoutException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.ServiceProcess.TimeoutException
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
.NET 10 (package-provided) 和其他版本
产品 | 版本 (已过时) |
---|---|
.NET | (8 (package-provided), 9 (package-provided), 10 (package-provided)) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
- 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
.NET 10 (package-provided) 和其他版本
产品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |