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

Initializes a new instance of the ManagementException class.

C#
public ManagementException();

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

.NET 10 (package-provided) ja muud versioonid
Toode Versioonid
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

ManagementException(String)

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

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

C#
public ManagementException(string message);

Parameters

message
String

The message that describes the error.

Applies to

.NET 10 (package-provided) ja muud versioonid
Toode Versioonid
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

ManagementException(SerializationInfo, StreamingContext)

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.

C#
[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);
C#
protected ManagementException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);

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

.NET 10 (package-provided) ja muud versioonid
Toode Versioonid (aegunud)
.NET (8 (package-provided), 9 (package-provided), 10 (package-provided))
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

ManagementException(String, Exception)

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.

C#
public ManagementException(string message, Exception innerException);

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

.NET 10 (package-provided) ja muud versioonid
Toode Versioonid
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)