RuntimeBinderException 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 RuntimeBinderException 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| RuntimeBinderException() |
初始化 RuntimeBinderException 類別的新執行個體。 |
| RuntimeBinderException(String) |
初始化一個有指定錯誤訊息的類別新實例 RuntimeBinderException 。 |
| RuntimeBinderException(SerializationInfo, StreamingContext) |
已淘汰.
初始化一個擁有序列化資料的類別新實例 RuntimeBinderException 。 |
| RuntimeBinderException(String, Exception) |
初始化一個新的類別實例,該實例 RuntimeBinderException 包含指定的錯誤訊息及對導致該異常的內部例外的參考。 |
RuntimeBinderException()
初始化 RuntimeBinderException 類別的新執行個體。
public:
RuntimeBinderException();
public RuntimeBinderException();
Public Sub New ()
備註
此建構子會將新實例的屬性初始 Message 化為系統提供的訊息,描述錯誤,例如「DefaultMessageDisplayedByParameterlessCtorWriterMustSupply」。 此訊息考量了當前系統文化。
下表顯示了 的 InsufficientMemoryException初始屬性值。
| 房產 | 價值 |
|---|---|
| InnerException |
null。 |
| Message | 區域化錯誤訊息字串。 |
另請參閱
適用於
RuntimeBinderException(String)
初始化一個有指定錯誤訊息的類別新實例 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)
警告
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)
初始化一個新的類別實例,該實例 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
該例外是當前例外的原因,若未指定內部例外則為空參考。
備註
因先前例外直接拋出的例外,應包含對該屬性中 InnerException 先前例外的參考。 該 InnerException 屬性回傳與傳入建構子相同的值,或 null 若該 InnerException 性質未提供內部例外值給建構子。
下表顯示了 的 RuntimeBinderException初始屬性值。
| 房產 | 價值 |
|---|---|
| InnerException |
null。 |
| Message | 錯誤訊息字串在 message中指定。 |