RemotingException 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 RemotingException 类的新实例。
重载
| 名称 | 说明 |
|---|---|
| RemotingException() |
使用默认属性初始化类的新实例 RemotingException 。 |
| RemotingException(String) |
使用指定的消息初始化类的新实例 RemotingException 。 |
| RemotingException(SerializationInfo, StreamingContext) |
从序列化的数据初始化类的新实例 RemotingException 。 |
| RemotingException(String, Exception) |
使用指定的错误消息和对作为此异常原因的内部异常的引用初始化 RemotingException 类的新实例。 |
RemotingException()
使用默认属性初始化类的新实例 RemotingException 。
public:
RemotingException();
public RemotingException();
Public Sub New ()
注解
RemotingException 继承自 SystemException 类。 下表显示了类实例 RemotingException 的初始属性值:
| 财产 | 价值 |
|---|---|
| InnerException | null |
| Message | 空字符串 (“”) |
另请参阅
适用于
RemotingException(String)
使用指定的消息初始化类的新实例 RemotingException 。
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
说明发生异常的原因的错误消息。
注解
RemotingException 继承自 SystemException 类。 下表显示了类实例 RemotingException 的初始属性值:
| 属性类型 | 条件 |
|---|---|
| InnerException | null |
| Message | 字符串message |
另请参阅
适用于
RemotingException(SerializationInfo, StreamingContext)
从序列化的数据初始化类的新实例 RemotingException 。
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
保存序列化对象数据的对象。
- context
- StreamingContext
有关异常的源或目标的上下文信息。
例外
参数 info 为 null.
注解
在反序列化期间调用此构造函数以重新构造通过流传输的异常对象。 (有关序列化的详细信息,请参阅 XML 和 SOAP 序列化。
适用于
RemotingException(String, Exception)
使用指定的错误消息和对作为此异常原因的内部异常的引用初始化 RemotingException 类的新实例。
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
说明发生异常的原因的错误消息。
- InnerException
- Exception
是当前异常原因的异常。 如果未 InnerExceptionnull 参数,则会在处理内部异常的 catch 块中引发当前异常。
注解
作为上一个异常的直接结果引发的异常将包括对属性中上一个异常的 InnerException 引用。
InnerException 属性返回传入构造函数的相同值,或者如果 null 属性未向构造函数提供内部异常值,则返回 InnerException。
下表显示了类实例 RemotingException 的初始属性值:
| 财产 | 价值 |
|---|---|
| InnerException | 内部异常引用。 |
| Message | 错误消息字符串。 |