RuntimeBinderException 建構函式

定義

初始化 RuntimeBinderException 類別的新執行個體。

多載

RuntimeBinderException()

初始化 RuntimeBinderException 類別的新執行個體。

RuntimeBinderException(String)

初始化 RuntimeBinderException 類別的新執行個體,這個執行個體有指定的錯誤訊息。

RuntimeBinderException(SerializationInfo, StreamingContext)
已淘汰.

初始化 RuntimeBinderException 類別的新執行個體,這個執行個體有序列化資料。

RuntimeBinderException(String, Exception)

初始化 RuntimeBinderException 類別的新執行個體,這個執行個體有指定的錯誤訊息和造成這個例外狀況發生之內部例外狀況的參考。

RuntimeBinderException()

來源:
RuntimeBinderException.cs
來源:
RuntimeBinderException.cs
來源:
RuntimeBinderException.cs

初始化 RuntimeBinderException 類別的新執行個體。

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

備註

這個建構函式會將 Message 新實例的 屬性初始化為描述錯誤的系統提供的訊息,例如 “DefaultMessageDisplayedByParameterlessCtorWriterMustSupply” 此訊息會考慮目前的系統文化特性。

下表顯示 InsufficientMemoryException 執行個體的初始屬性值。

屬性
InnerException null.
Message 當地語系化的錯誤訊息字串。

另請參閱

適用於

RuntimeBinderException(String)

來源:
RuntimeBinderException.cs
來源:
RuntimeBinderException.cs
來源:
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)

來源:
RuntimeBinderException.cs
來源:
RuntimeBinderException.cs
來源:
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);
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);
new Microsoft.CSharp.RuntimeBinder.RuntimeBinderException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> Microsoft.CSharp.RuntimeBinder.RuntimeBinderException
[<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
Protected Sub New (info As SerializationInfo, context As StreamingContext)

參數

info
SerializationInfo

物件,存放關於所擲回例外狀況的已序列化物件資料。

context
StreamingContext

關於來源或目的端的內容資訊。

屬性

備註

這個建構函式是在還原序列化期間呼叫,以便重新組成透過資料流傳輸的例外狀況物件。

適用於

RuntimeBinderException(String, Exception)

來源:
RuntimeBinderException.cs
來源:
RuntimeBinderException.cs
來源:
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 屬性傳回的值會與傳入建構函式的值相同,或傳回 null (如果 InnerException 屬性未提供內部例外狀況值給建構函式)。

下表顯示 RuntimeBinderException 執行個體的初始屬性值。

屬性
InnerException null.
Message message 中指定的錯誤訊息字串。

適用於