HostAbortedException Constructors

Definition

Overloads

HostAbortedException()

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

HostAbortedException(String)

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

HostAbortedException(String, Exception)

Initializes a new instance of the HostAbortedException class with a specified error message and a reference to the inner exception that is the cause of this exception.

HostAbortedException()

Source:
HostAbortedException.cs
Source:
HostAbortedException.cs
Source:
HostAbortedException.cs

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

C#
public HostAbortedException();

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)

HostAbortedException(String)

Source:
HostAbortedException.cs
Source:
HostAbortedException.cs
Source:
HostAbortedException.cs

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

C#
public HostAbortedException(string? message);

Parameters

message
String

The error message that explains the reason for the exception.

Remarks

The content of message 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.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)

HostAbortedException(String, Exception)

Source:
HostAbortedException.cs
Source:
HostAbortedException.cs
Source:
HostAbortedException.cs

Initializes a new instance of the HostAbortedException class with a specified error message and a reference to the inner exception that is the cause of this exception.

C#
public HostAbortedException(string? message, Exception? innerException);

Parameters

message
String

The error message that explains the reason for the exception.

innerException
Exception

The exception that is the cause of the current exception.

Remarks

The content of message 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.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)