ManagementException Constructors

Definition

Initializes a new instance of the ManagementException class.

Overloads

ManagementException()

Initializes a new instance of the ManagementException class.

ManagementException(String)

Initializes a new instance of the ManagementException class with a specified error message.

ManagementException(SerializationInfo, StreamingContext)

Initializes a new instance of the ManagementException class that is serializable.

ManagementException(String, Exception)

Initializes an empty new instance of the ManagementException class. If the innerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.

ManagementException()

Initializes a new instance of the ManagementException class.

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

Remarks

.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.

Applies to

ManagementException(String)

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)

Parameters

message
String

The message that describes the error.

Applies to

ManagementException(SerializationInfo, StreamingContext)

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)

Parameters

info
SerializationInfo

The SerializationInfo to populate with data.

context
StreamingContext

The StreamingContext destination for this serialization.

Remarks

.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.

Applies to

ManagementException(String, Exception)

Initializes an empty new instance of the ManagementException class. 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)

Parameters

message
String

The message that describes the error.

innerException
Exception

The exception that is the cause of the current exception.

Remarks

.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.

Applies to