ManagementException 建構函式

定義

初始化 ManagementException 類別的新執行個體。Initializes a new instance of the ManagementException class.

多載

ManagementException()

初始化 ManagementException 類別的新執行個體。Initializes a new instance of the ManagementException class.

ManagementException(String)

使用指定的錯誤訊息,初始化 ManagementException 類別的新執行個體。Initializes a new instance of the ManagementException class with a specified error message.

ManagementException(SerializationInfo, StreamingContext)

初始化可序列化之 ManagementException 類別的新執行個體。Initializes a new instance of the ManagementException class that is serializable.

ManagementException(String, Exception)

初始化 ManagementException 類別新的空執行個體。Initializes an empty new instance of the ManagementException class. 如果 innerException 參數不是 null,則目前的例外狀況會在處理內部例外狀況的 Catch 區塊中引發。If the innerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.

ManagementException()

初始化 ManagementException 類別的新執行個體。Initializes a new instance of the ManagementException class.

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

備註

.NET Framework 安全性.NET Framework Security

完全信任立即呼叫者。Full trust for the immediate caller. 這個成員無法供部分信任的程式碼使用。This member cannot be used by partially trusted code. 如需詳細資訊, 請參閱從部分信任的程式碼使用程式庫For more information, see Using Libraries from Partially Trusted Code.

ManagementException(String)

使用指定的錯誤訊息,初始化 ManagementException 類別的新執行個體。Initializes a new instance of the ManagementException class with a specified error message.

public:
 ManagementException(System::String ^ message);
public ManagementException (string message);
new System.Management.ManagementException : string -> System.Management.ManagementException
Public Sub New (message As String)

參數

message
String

描述錯誤的訊息。The message that describes the error.

ManagementException(SerializationInfo, StreamingContext)

初始化可序列化之 ManagementException 類別的新執行個體。Initializes a new instance of the ManagementException class that is serializable.

protected:
 ManagementException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected ManagementException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Management.ManagementException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Management.ManagementException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

參數

info
SerializationInfo

要以資料填入的 SerializationInfoThe SerializationInfo to populate with data.

context
StreamingContext

這個序列化的 StreamingContext 目的端。The StreamingContext destination for this serialization.

備註

.NET Framework 安全性.NET Framework Security

完全信任立即呼叫者。Full trust for the immediate caller. 這個成員無法供部分信任的程式碼使用。This member cannot be used by partially trusted code. 如需詳細資訊, 請參閱從部分信任的程式碼使用程式庫For more information, see Using Libraries from Partially Trusted Code.

ManagementException(String, Exception)

初始化 ManagementException 類別新的空執行個體。Initializes an empty new instance of the ManagementException class. 如果 innerException 參數不是 null,則目前的例外狀況會在處理內部例外狀況的 Catch 區塊中引發。If the innerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.

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

參數

message
String

描述錯誤的訊息。The message that describes the error.

innerException
Exception

做為目前例外狀況發生原因的例外狀況。The exception that is the cause of the current exception.

備註

.NET Framework 安全性.NET Framework Security

完全信任立即呼叫者。Full trust for the immediate caller. 這個成員無法供部分信任的程式碼使用。This member cannot be used by partially trusted code. 如需詳細資訊, 請參閱從部分信任的程式碼使用程式庫For more information, see Using Libraries from Partially Trusted Code.

適用於