Freigeben über


UnauthorizedAccessException Konstruktoren

Definition

Initialisiert eine neue Instanz der UnauthorizedAccessException-Klasse.

Überlädt

Name Beschreibung
UnauthorizedAccessException()

Initialisiert eine neue Instanz der UnauthorizedAccessException-Klasse.

UnauthorizedAccessException(String)

Initialisiert eine neue Instanz der UnauthorizedAccessException Klasse mit einer angegebenen Fehlermeldung.

UnauthorizedAccessException(SerializationInfo, StreamingContext)
Veraltet.

Initialisiert eine neue Instanz der UnauthorizedAccessException Klasse mit serialisierten Daten.

UnauthorizedAccessException(String, Exception)

Initialisiert eine neue Instanz der UnauthorizedAccessException Klasse mit einer angegebenen Fehlermeldung und einem Verweis auf die innere Ausnahme, die die Ursache dieser Ausnahme ist.

UnauthorizedAccessException()

Quelle:
UnauthorizedAccessException.cs
Quelle:
UnauthorizedAccessException.cs
Quelle:
UnauthorizedAccessException.cs
Quelle:
UnauthorizedAccessException.cs
Quelle:
UnauthorizedAccessException.cs

Initialisiert eine neue Instanz der UnauthorizedAccessException-Klasse.

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

Hinweise

Dieser Konstruktor initialisiert die Message Eigenschaft der neuen Instanz in einer vom System bereitgestellten Meldung, die den Fehler beschreibt, z. B. "Versucht, einen nicht autorisierten Vorgang auszuführen". Diese Meldung berücksichtigt die aktuelle Systemkultur.

In der folgenden Tabelle sind die anfänglichen Eigenschaftswerte für eine Instanz von MemberAccessException.

Eigentum Wert
InnerException Ein Nullverweis (Nothing in Visual Basic).
Message Die lokalisierte Fehlermeldungszeichenfolge.

Gilt für:

UnauthorizedAccessException(String)

Quelle:
UnauthorizedAccessException.cs
Quelle:
UnauthorizedAccessException.cs
Quelle:
UnauthorizedAccessException.cs
Quelle:
UnauthorizedAccessException.cs
Quelle:
UnauthorizedAccessException.cs

Initialisiert eine neue Instanz der UnauthorizedAccessException Klasse mit einer angegebenen Fehlermeldung.

public:
 UnauthorizedAccessException(System::String ^ message);
public UnauthorizedAccessException(string message);
public UnauthorizedAccessException(string? message);
new UnauthorizedAccessException : string -> UnauthorizedAccessException
Public Sub New (message As String)

Parameter

message
String

Die Meldung, die den Fehler beschreibt.

Hinweise

Der Inhalt des message Parameters sollte für den Benutzer verständlich sein. Der Aufrufer dieses Konstruktors ist erforderlich, um sicherzustellen, dass diese Zeichenfolge für die aktuelle Systemkultur lokalisiert wurde.

In der folgenden Tabelle sind die anfänglichen Eigenschaftswerte für eine Instanz von UnauthorizedAccessException.

Eigentum Wert
InnerException Ein Nullverweis (Nothing in Visual Basic).
Message Die Fehlermeldungszeichenfolge.

Gilt für:

UnauthorizedAccessException(SerializationInfo, StreamingContext)

Quelle:
UnauthorizedAccessException.cs
Quelle:
UnauthorizedAccessException.cs
Quelle:
UnauthorizedAccessException.cs
Quelle:
UnauthorizedAccessException.cs
Quelle:
UnauthorizedAccessException.cs

Achtung

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

Initialisiert eine neue Instanz der UnauthorizedAccessException Klasse mit serialisierten Daten.

protected:
 UnauthorizedAccessException(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 UnauthorizedAccessException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected UnauthorizedAccessException(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}")>]
new UnauthorizedAccessException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> UnauthorizedAccessException
new UnauthorizedAccessException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> UnauthorizedAccessException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameter

info
SerializationInfo

Das SerializationInfo Objekt enthält die serialisierten Objektdaten zu der Ausnahme, die ausgelöst wird.

context
StreamingContext

Die StreamingContext kontextbezogene Informationen zur Quelle oder zum Ziel.

Attribute

Gilt für:

UnauthorizedAccessException(String, Exception)

Quelle:
UnauthorizedAccessException.cs
Quelle:
UnauthorizedAccessException.cs
Quelle:
UnauthorizedAccessException.cs
Quelle:
UnauthorizedAccessException.cs
Quelle:
UnauthorizedAccessException.cs

Initialisiert eine neue Instanz der UnauthorizedAccessException Klasse mit einer angegebenen Fehlermeldung und einem Verweis auf die innere Ausnahme, die die Ursache dieser Ausnahme ist.

public:
 UnauthorizedAccessException(System::String ^ message, Exception ^ inner);
public UnauthorizedAccessException(string message, Exception inner);
public UnauthorizedAccessException(string? message, Exception? inner);
new UnauthorizedAccessException : string * Exception -> UnauthorizedAccessException
Public Sub New (message As String, inner As Exception)

Parameter

message
String

Die Fehlermeldung, die den Grund für die Ausnahme erklärt.

inner
Exception

Die Ausnahme, die die Ursache der aktuellen Ausnahme ist. Wenn der inner Parameter kein Nullverweis (Nothing in Visual Basic) ist, wird die aktuelle Ausnahme in einem catch Block ausgelöst, der die innere Ausnahme behandelt.

Hinweise

Eine Ausnahme, die als direktes Ergebnis einer vorherigen Ausnahme ausgelöst wird, sollte einen Verweis auf die vorherige Ausnahme in der InnerException Eigenschaft enthalten. Die InnerException Eigenschaft gibt denselben Wert zurück, der an den Konstruktor übergeben wird, oder einen Nullverweis (Nothing in Visual Basic), wenn die InnerException Eigenschaft den inneren Ausnahmewert nicht für den Konstruktor angibt.

In der folgenden Tabelle sind die anfänglichen Eigenschaftswerte für eine Instanz von UnauthorizedAccessException.

Eigentum Wert
InnerException Der interne Ausnahmeverweis.
Message Die Fehlermeldungszeichenfolge.

Gilt für: