共用方式為


TypeUnloadedException 建構函式

定義

初始化該類別的新實例 TypeUnloadedException

多載

名稱 Description
TypeUnloadedException()

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

TypeUnloadedException(String)

初始化類別的新實例 TypeUnloadedException 並指定錯誤訊息。

TypeUnloadedException(SerializationInfo, StreamingContext)
已淘汰.

使用串行化數據,初始化 TypeUnloadedException 類別的新實例。

TypeUnloadedException(String, Exception)

初始化類別的新實例 TypeUnloadedException ,並附上指定的錯誤訊息及導致該異常的內部例外的參考。

TypeUnloadedException()

來源:
TypeUnloadedException.cs
來源:
TypeUnloadedException.cs
來源:
TypeUnloadedException.cs
來源:
TypeUnloadedException.cs
來源:
TypeUnloadedException.cs

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

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

備註

此建構器會將 Message 新實例的屬性初始化為系統提供的訊息,描述錯誤,例如「型別已被卸載」。此訊息考量了當前系統文化。

下表顯示了 的 TypeUnloadedException初始屬性值。

房產 價值
InnerException 一個空參考(Nothing Visual Basic 中的 Reference)。
Message 區域化錯誤訊息字串。

適用於

TypeUnloadedException(String)

來源:
TypeUnloadedException.cs
來源:
TypeUnloadedException.cs
來源:
TypeUnloadedException.cs
來源:
TypeUnloadedException.cs
來源:
TypeUnloadedException.cs

初始化類別的新實例 TypeUnloadedException 並指定錯誤訊息。

public:
 TypeUnloadedException(System::String ^ message);
public TypeUnloadedException(string? message);
public TypeUnloadedException(string message);
new TypeUnloadedException : string -> TypeUnloadedException
Public Sub New (message As String)

參數

message
String

描述錯誤的訊息。

備註

參數的內容 message 應該能讓最終使用者理解。 此建構器的呼叫者必須確保此字串已在目前系統文化中本地化。

下表顯示了 的 TypeUnloadedException初始屬性值。

房產 價值
InnerException 一個空參考(Nothing Visual Basic 中的 Reference)。
Message 錯誤訊息字串。

適用於

TypeUnloadedException(SerializationInfo, StreamingContext)

來源:
TypeUnloadedException.cs
來源:
TypeUnloadedException.cs
來源:
TypeUnloadedException.cs
來源:
TypeUnloadedException.cs
來源:
TypeUnloadedException.cs

警告

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

使用串行化數據,初始化 TypeUnloadedException 類別的新實例。

protected:
 TypeUnloadedException(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 TypeUnloadedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected TypeUnloadedException(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 TypeUnloadedException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> TypeUnloadedException
new TypeUnloadedException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> TypeUnloadedException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

參數

info
SerializationInfo

存放序列化物件資料的物件。

context
StreamingContext

關於來源或目的地的上下文資訊。

屬性

備註

此建構子在反序列化過程中被呼叫,以重建透過串流傳輸的例外物件。 欲了解更多資訊,請參閱 XML 與 SOAP 序列化

另請參閱

適用於

TypeUnloadedException(String, Exception)

來源:
TypeUnloadedException.cs
來源:
TypeUnloadedException.cs
來源:
TypeUnloadedException.cs
來源:
TypeUnloadedException.cs
來源:
TypeUnloadedException.cs

初始化類別的新實例 TypeUnloadedException ,並附上指定的錯誤訊息及導致該異常的內部例外的參考。

public:
 TypeUnloadedException(System::String ^ message, Exception ^ innerException);
public TypeUnloadedException(string? message, Exception? innerException);
public TypeUnloadedException(string message, Exception innerException);
new TypeUnloadedException : string * Exception -> TypeUnloadedException
Public Sub New (message As String, innerException As Exception)

參數

message
String

錯誤訊息解釋了例外原因。

innerException
Exception

該例外即為當前例外的原因。 如果參數 innerException 不是 null 參考(Nothing 在 Visual Basic 中),當前例外會在處理內部例外的區塊中被提出 catch

備註

因先前例外直接拋出的例外,可以包含對該屬性中先前 InnerException 例外的參考。 該InnerException屬性會回傳與傳入建構子相同的值,或若該InnerException屬性未提供內建器內部例外值,則回傳 Visual Basic 中的空參考Nothing

下表顯示了 的 TypeUnloadedException初始屬性值。

房產 價值
InnerException 內部例外的參考。
Message 錯誤訊息字串。

另請參閱

適用於