Freigeben über


RemoteException Constructors

Definition

Overloads

RemoteException()

Initializes a new instance of RemoteException.

RemoteException(String)

Initializes a new instance of RemoteException with a specified error message.

RemoteException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the RemoteException class with serialized data.

RemoteException(String, Exception)

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

RemoteException()

Initializes a new instance of RemoteException.

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

Applies to

RemoteException(String)

Initializes a new instance of RemoteException with a specified error message.

public:
 RemoteException(System::String ^ message);
public:
 RemoteException(Platform::String ^ message);
 RemoteException(std::wstring const & message);
public RemoteException (string message);
new System.Management.Automation.RemoteException : string -> System.Management.Automation.RemoteException
Public Sub New (message As String)

Parameters

message
String

The message that describes the error.

Applies to

RemoteException(SerializationInfo, StreamingContext)

Caution

Legacy serialization support is deprecated since .NET 8

Initializes a new instance of the RemoteException class with serialized data.

protected:
 RemoteException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected RemoteException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("Legacy serialization support is deprecated since .NET 8", DiagnosticId="SYSLIB0051")]
protected RemoteException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Management.Automation.RemoteException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Management.Automation.RemoteException
[<System.Obsolete("Legacy serialization support is deprecated since .NET 8", DiagnosticId="SYSLIB0051")>]
new System.Management.Automation.RemoteException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Management.Automation.RemoteException
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

Applies to

RemoteException(String, Exception)

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

public:
 RemoteException(System::String ^ message, Exception ^ innerException);
public RemoteException (string message, Exception innerException);
new System.Management.Automation.RemoteException : string * Exception -> System.Management.Automation.RemoteException
Public Sub New (message As String, innerException As Exception)

Parameters

message
String

The message that describes the error.

innerException
Exception

The exception that is the cause of the current exception.

Applies to