DirectoryServicesCOMException Constructors

Definition

Initializes a new instance of the DirectoryServicesCOMException class.

Overloads

DirectoryServicesCOMException()

Initializes a new instance of the DirectoryServicesCOMException class.

DirectoryServicesCOMException(String)

Initializes a new instance of the DirectoryServicesCOMException class with the specified string.

DirectoryServicesCOMException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the DirectoryServicesCOMException class with the specified serialization information and streaming context.

DirectoryServicesCOMException(String, Exception)

Initializes a new instance of the DirectoryServicesCOMException class with the specified string and exception.

DirectoryServicesCOMException()

Source:
DirectoryServicesCOMException.cs
Source:
DirectoryServicesCOMException.cs
Source:
DirectoryServicesCOMException.cs
Source:
DirectoryServicesCOMException.cs
Source:
DirectoryServicesCOMException.cs

Initializes a new instance of the DirectoryServicesCOMException class.

C#
public DirectoryServicesCOMException();

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 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)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

DirectoryServicesCOMException(String)

Source:
DirectoryServicesCOMException.cs
Source:
DirectoryServicesCOMException.cs
Source:
DirectoryServicesCOMException.cs
Source:
DirectoryServicesCOMException.cs
Source:
DirectoryServicesCOMException.cs

Initializes a new instance of the DirectoryServicesCOMException class with the specified string.

C#
public DirectoryServicesCOMException(string? message);
C#
public DirectoryServicesCOMException(string message);

Parameters

message
String

The message that describes the error.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 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)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

DirectoryServicesCOMException(SerializationInfo, StreamingContext)

Source:
DirectoryServicesCOMException.cs
Source:
DirectoryServicesCOMException.cs
Source:
DirectoryServicesCOMException.cs
Source:
DirectoryServicesCOMException.cs
Source:
DirectoryServicesCOMException.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 DirectoryServicesCOMException class with the specified serialization information and streaming context.

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

Applies to

.NET 10 (package-provided) and other versions
Product Versions (Obsolete)
.NET (8 (package-provided), 9 (package-provided), 10 (package-provided))
.NET Framework 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)
Windows Desktop 3.0, 3.1, 5, 6, 7 (8, 9, 10)

DirectoryServicesCOMException(String, Exception)

Source:
DirectoryServicesCOMException.cs
Source:
DirectoryServicesCOMException.cs
Source:
DirectoryServicesCOMException.cs
Source:
DirectoryServicesCOMException.cs
Source:
DirectoryServicesCOMException.cs

Initializes a new instance of the DirectoryServicesCOMException class with the specified string and exception.

C#
public DirectoryServicesCOMException(string? message, Exception? inner);
C#
public DirectoryServicesCOMException(string message, Exception inner);

Parameters

message
String

The message that describes the error.

inner
Exception

The exception that is the cause of the current exception.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 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)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10