RemotingException 构造函数
定义
初始化 RemotingException 类的新实例。Initializes a new instance of the RemotingException class.
重载
| RemotingException() |
使用默认属性初始化 RemotingException 类的新实例。Initializes a new instance of the RemotingException class with default properties. |
| RemotingException(String) |
用指定的消息初始化 RemotingException 类的新实例。Initializes a new instance of the RemotingException class with a specified message. |
| RemotingException(SerializationInfo, StreamingContext) |
用序列化数据初始化 RemotingException 类的新实例。Initializes a new instance of the RemotingException class from serialized data. |
| RemotingException(String, Exception) |
使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 RemotingException 类的新实例。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()
使用默认属性初始化 RemotingException 类的新实例。Initializes a new instance of the RemotingException class with default properties.
public:
RemotingException();
public RemotingException ();
Public Sub New ()
注解
RemotingException 继承自 SystemException 类。RemotingException inherits from the SystemException class. 下表显示了类的实例的初始属性值 RemotingException :The following table shows initial property values for an instance of the RemotingException class:
| 属性Property | ValueValue |
|---|---|
| InnerException | null |
| Message | 空字符串 ( "" ) The empty string ("") |
另请参阅
适用于
RemotingException(String)
用指定的消息初始化 RemotingException 类的新实例。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)
参数
- message
- String
解释异常发生的原因的错误信息。The error message that explains why the exception occurred.
注解
RemotingException 继承自 SystemException 类。RemotingException inherits from the SystemException class. 下表显示了类的实例的初始属性值 RemotingException :The following table shows initial property values for an instance of the RemotingException class:
| 属性类型Property Type | 条件Condition |
|---|---|
| InnerException | null |
| Message | message字符串The message string |
另请参阅
适用于
RemotingException(SerializationInfo, StreamingContext)
用序列化数据初始化 RemotingException 类的新实例。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)
参数
- info
- SerializationInfo
承载序列化对象数据的对象。The object that holds the serialized object data.
- context
- StreamingContext
有关异常的源或目标的上下文信息。The contextual information about the source or destination of the exception.
例外
info 参数为 null。The info parameter is null.
注解
在反序列化期间调用此构造函数以重新构造在流上传输的异常对象。This constructor is called during deserialization to reconstitute the exception object transmitted over a stream. (有关序列化的详细信息,请参阅 XML 和 SOAP 序列化。 ) (For more information on serialization, see XML and SOAP Serialization.)
适用于
RemotingException(String, Exception)
使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 RemotingException 类的新实例。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)
参数
- message
- String
解释异常发生的原因的错误信息。The error message that explains why the exception occurred.
- InnerException
- Exception
导致当前异常的异常。The exception that is the cause of the current exception. 如果 InnerException 参数不为 null,则当前异常将在处理内部异常的 catch 块中引发。If the InnerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.
注解
作为上一个异常的直接结果引发的异常将在属性中包含对前一个异常的引用 InnerException 。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. InnerException 属性将返回传递给构造函数的同一值;如果 InnerException 属性不向构造函数提供内部异常值,则返回 null。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.
下表显示了类的实例的初始属性值 RemotingException :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. |