RemotingException Constructors

Definition

Initializes a new instance of the RemotingException class.

Overloads

RemotingException()

Initializes a new instance of the RemotingException class with default properties.

RemotingException(String)

Initializes a new instance of the RemotingException class with a specified message.

RemotingException(SerializationInfo, StreamingContext)

Initializes a new instance of the RemotingException class from serialized data.

RemotingException(String, Exception)

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

RemotingException()

Initializes a new instance of the RemotingException class with default properties.

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

Remarks

RemotingException inherits from the SystemException class. The following table shows initial property values for an instance of the RemotingException class:

Property Value
InnerException null
Message The empty string ("")

See also

Applies to

RemotingException(String)

Initializes a new instance of the RemotingException class with a specified message.

public:
 RemotingException(System::String ^ message);
public RemotingException (string message);
new System.Runtime.Remoting.RemotingException : string -> System.Runtime.Remoting.RemotingException
Public Sub New (message As String)

Parameters

message
String

The error message that explains why the exception occurred.

Remarks

RemotingException inherits from the SystemException class. The following table shows initial property values for an instance of the RemotingException class:

Property Type Condition
InnerException null
Message The message string

See also

Applies to

RemotingException(SerializationInfo, StreamingContext)

Initializes a new instance of the RemotingException class from serialized data.

protected:
 RemotingException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected RemotingException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Runtime.Remoting.RemotingException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Runtime.Remoting.RemotingException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

The object that holds the serialized object data.

context
StreamingContext

The contextual information about the source or destination of the exception.

Exceptions

The info parameter is null.

Remarks

This constructor is called during deserialization to reconstitute the exception object transmitted over a stream. (For more information on serialization, see XML and SOAP Serialization.)

Applies to

RemotingException(String, Exception)

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

public:
 RemotingException(System::String ^ message, Exception ^ InnerException);
public RemotingException (string message, Exception InnerException);
new System.Runtime.Remoting.RemotingException : string * Exception -> System.Runtime.Remoting.RemotingException
Public Sub New (message As String, InnerException As Exception)

Parameters

message
String

The error message that explains why the exception occurred.

InnerException
Exception

The exception that is the cause of the current exception. If the InnerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.

Remarks

An exception that is thrown as a direct result of a previous exception will include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor, or null if the InnerException property does not supply the inner exception value to the constructor.

The following table shows initial property values for an instance of the RemotingException class:

Property Value
InnerException The inner exception reference.
Message The error message string.

See also

Applies to