CommunicationException Constructors

Definition

Initializes a new instance of the CommunicationException class.

Overloads

CommunicationException()

Initializes a new instance of the CommunicationException class.

CommunicationException(String)

Initializes a new instance of the CommunicationException class, using the specified message.

CommunicationException(SerializationInfo, StreamingContext)

Initializes a new instance of the CommunicationException class, using the specified serialization information and context objects.

CommunicationException(String, Exception)

Initializes a new instance of the CommunicationException class, using the specified message and the inner exception.

CommunicationException()

Source:
CommunicationException.cs
Source:
CommunicationException.cs

Initializes a new instance of the CommunicationException class.

C#
public CommunicationException();

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 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)
UWP 10.0

CommunicationException(String)

Source:
CommunicationException.cs
Source:
CommunicationException.cs

Initializes a new instance of the CommunicationException class, using the specified message.

C#
public CommunicationException(string message);

Parameters

message
String

The description of the error condition.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 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)
UWP 10.0

CommunicationException(SerializationInfo, StreamingContext)

Source:
CommunicationException.cs
Source:
CommunicationException.cs

Initializes a new instance of the CommunicationException class, using the specified serialization information and context objects.

C#
protected CommunicationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);

Parameters

info
SerializationInfo

Information relevant to the deserialization process.

context
StreamingContext

The context of the deserialization process.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 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)

CommunicationException(String, Exception)

Source:
CommunicationException.cs
Source:
CommunicationException.cs

Initializes a new instance of the CommunicationException class, using the specified message and the inner exception.

C#
public CommunicationException(string message, Exception innerException);

Parameters

message
String

The description of the error condition.

innerException
Exception

The inner exception to be used.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 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)
UWP 10.0