通过


RuntimeBinderException 构造函数

定义

初始化 RuntimeBinderException 类的新实例。

重载

名称 说明
RuntimeBinderException()

初始化 RuntimeBinderException 类的新实例。

RuntimeBinderException(String)

初始化具有指定错误消息的 RuntimeBinderException 类的新实例。

RuntimeBinderException(SerializationInfo, StreamingContext)
已过时.

初始化已序列化数据的类的新实例 RuntimeBinderException

RuntimeBinderException(String, Exception)

初始化类的新实例 RuntimeBinderException ,该类具有指定的错误消息和对此异常原因的内部异常的引用。

RuntimeBinderException()

Source:
RuntimeBinderException.cs
Source:
RuntimeBinderException.cs
Source:
RuntimeBinderException.cs
Source:
RuntimeBinderException.cs
Source:
RuntimeBinderException.cs

初始化 RuntimeBinderException 类的新实例。

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

注解

此构造函数将 Message 新实例的属性初始化为描述错误的系统提供的消息,例如“DefaultMessageDisplayedByParameterlessCtorWriterMustSupply”。 此消息将考虑当前系统区域性。

下表显示了实例 InsufficientMemoryException的初始属性值。

财产 价值
InnerException null
Message 本地化的错误消息字符串。

另请参阅

适用于

RuntimeBinderException(String)

Source:
RuntimeBinderException.cs
Source:
RuntimeBinderException.cs
Source:
RuntimeBinderException.cs
Source:
RuntimeBinderException.cs
Source:
RuntimeBinderException.cs

初始化具有指定错误消息的 RuntimeBinderException 类的新实例。

public:
 RuntimeBinderException(System::String ^ message);
public RuntimeBinderException(string message);
public RuntimeBinderException(string? message);
new Microsoft.CSharp.RuntimeBinder.RuntimeBinderException : string -> Microsoft.CSharp.RuntimeBinder.RuntimeBinderException
Public Sub New (message As String)

参数

message
String

描述异常的消息。 此构造函数的调用方必须确保此字符串已本地化为当前系统区域性。

注解

下表显示了实例 RuntimeBinderException的初始属性值。

财产 价值
InnerException null
Message 中指定的 message错误消息字符串 。

另请参阅

适用于

RuntimeBinderException(SerializationInfo, StreamingContext)

Source:
RuntimeBinderException.cs
Source:
RuntimeBinderException.cs
Source:
RuntimeBinderException.cs
Source:
RuntimeBinderException.cs
Source:
RuntimeBinderException.cs

注意

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

初始化已序列化数据的类的新实例 RuntimeBinderException

protected:
 RuntimeBinderException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected RuntimeBinderException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected RuntimeBinderException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new Microsoft.CSharp.RuntimeBinder.RuntimeBinderException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> Microsoft.CSharp.RuntimeBinder.RuntimeBinderException
new Microsoft.CSharp.RuntimeBinder.RuntimeBinderException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> Microsoft.CSharp.RuntimeBinder.RuntimeBinderException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

参数

info
SerializationInfo

保存所引发异常的序列化对象数据的对象。

context
StreamingContext

有关源或目标的上下文信息。

属性

注解

在反序列化期间调用此构造函数以重新构造通过流传输的异常对象。

适用于

RuntimeBinderException(String, Exception)

Source:
RuntimeBinderException.cs
Source:
RuntimeBinderException.cs
Source:
RuntimeBinderException.cs
Source:
RuntimeBinderException.cs
Source:
RuntimeBinderException.cs

初始化类的新实例 RuntimeBinderException ,该类具有指定的错误消息和对此异常原因的内部异常的引用。

public:
 RuntimeBinderException(System::String ^ message, Exception ^ innerException);
public RuntimeBinderException(string message, Exception innerException);
public RuntimeBinderException(string? message, Exception? innerException);
new Microsoft.CSharp.RuntimeBinder.RuntimeBinderException : string * Exception -> Microsoft.CSharp.RuntimeBinder.RuntimeBinderException
Public Sub New (message As String, innerException As Exception)

参数

message
String

说明异常原因的错误消息。

innerException
Exception

异常是当前异常的原因,如果未指定内部异常,则为 null 引用。

注解

作为上一个异常的直接结果引发的异常应包含对属性中上一异常的 InnerException 引用。 该 InnerException 属性返回传入构造函数的相同值,或者 nullInnerException 属性未向构造函数提供内部异常值。

下表显示了实例 RuntimeBinderException的初始属性值。

财产 价值
InnerException null
Message 中指定的 message错误消息字符串 。

适用于