Bewerken

Share via


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

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()

Source:
ManagementException.cs
Source:
ManagementException.cs
Source:
ManagementException.cs
Source:
ManagementException.cs

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)

Source:
ManagementException.cs
Source:
ManagementException.cs
Source:
ManagementException.cs
Source:
ManagementException.cs

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)

Source:
ManagementException.cs
Source:
ManagementException.cs
Source:
ManagementException.cs
Source:
ManagementException.cs

Caution

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

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);
[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 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
[<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 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.

Attributes

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)

Source:
ManagementException.cs
Source:
ManagementException.cs
Source:
ManagementException.cs
Source:
ManagementException.cs

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