PrivilegeNotHeldException Constructors

Definition

Initializes a new instance of the PrivilegeNotHeldException class.

Overloads

PrivilegeNotHeldException()

Initializes a new instance of the PrivilegeNotHeldException class.

PrivilegeNotHeldException(String)

Initializes a new instance of the PrivilegeNotHeldException class by using the specified privilege.

PrivilegeNotHeldException(String, Exception)

Initializes a new instance of the PrivilegeNotHeldException class by using the specified exception.

PrivilegeNotHeldException()

Source:
PrivilegeNotHeldException.cs

Initializes a new instance of the PrivilegeNotHeldException class.

C#
public PrivilegeNotHeldException();

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6 (package-provided), 6, 7 (package-provided), 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.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

PrivilegeNotHeldException(String)

Source:
PrivilegeNotHeldException.cs

Initializes a new instance of the PrivilegeNotHeldException class by using the specified privilege.

C#
public PrivilegeNotHeldException(string? privilege);
C#
public PrivilegeNotHeldException(string privilege);

Parameters

privilege
String

The privilege that is not enabled.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6 (package-provided), 6, 7 (package-provided), 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.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

PrivilegeNotHeldException(String, Exception)

Source:
PrivilegeNotHeldException.cs

Initializes a new instance of the PrivilegeNotHeldException class by using the specified exception.

C#
public PrivilegeNotHeldException(string? privilege, Exception? inner);
C#
public PrivilegeNotHeldException(string privilege, Exception inner);

Parameters

privilege
String

The privilege that is not enabled.

inner
Exception

The exception that is the cause of the current exception. If the innerException parameter is not a null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6 (package-provided), 6, 7 (package-provided), 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.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