PolicyException Konstruktorer
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Initierar en ny instans av PolicyException klassen.
Överlagringar
| Name | Description |
|---|---|
| PolicyException() |
Initierar en ny instans av PolicyException klassen med standardegenskaper. |
| PolicyException(String) |
Initierar en ny instans av PolicyException klassen med ett angivet felmeddelande. |
| PolicyException(SerializationInfo, StreamingContext) |
Föråldrad.
Initierar en ny instans av PolicyException klassen med serialiserade data. |
| PolicyException(String, Exception) |
Initierar en ny instans av PolicyException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till det här undantaget. |
PolicyException()
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
Initierar en ny instans av PolicyException klassen med standardegenskaper.
public:
PolicyException();
public PolicyException();
Public Sub New ()
Kommentarer
I följande tabell visas de inledande egenskapsvärdena för en instans av PolicyException.
| Fastighet | Value |
|---|---|
| InnerException |
null. |
| Message | Den lokaliserade felmeddelandesträngen. |
Gäller för
PolicyException(String)
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
Initierar en ny instans av PolicyException klassen med ett angivet felmeddelande.
public:
PolicyException(System::String ^ message);
public PolicyException(string message);
new System.Security.Policy.PolicyException : string -> System.Security.Policy.PolicyException
Public Sub New (message As String)
Parametrar
- message
- String
Felmeddelandet som förklarar orsaken till undantaget.
Kommentarer
I följande tabell visas de inledande egenskapsvärdena för en instans av PolicyException.
| Fastighet | Value |
|---|---|
| InnerException |
null. |
| Message | Felmeddelandesträngen. |
Gäller för
PolicyException(SerializationInfo, StreamingContext)
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
Varning
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
Initierar en ny instans av PolicyException klassen med serialiserade data.
protected:
PolicyException(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 PolicyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected PolicyException(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 System.Security.Policy.PolicyException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Security.Policy.PolicyException
new System.Security.Policy.PolicyException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Security.Policy.PolicyException
Protected Sub New (info As SerializationInfo, context As StreamingContext)
Parametrar
- info
- SerializationInfo
Objektet som innehåller serialiserade objektdata.
- context
- StreamingContext
Sammanhangsinformation om källan eller målet.
- Attribut
Kommentarer
Den här konstruktorn anropas under deserialiseringen för att återskapa undantagsobjektet som överförs via en ström.
Gäller för
PolicyException(String, Exception)
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
- Källa:
- PolicyException.cs
Initierar en ny instans av PolicyException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till det här undantaget.
public:
PolicyException(System::String ^ message, Exception ^ exception);
public PolicyException(string message, Exception exception);
new System.Security.Policy.PolicyException : string * Exception -> System.Security.Policy.PolicyException
Public Sub New (message As String, exception As Exception)
Parametrar
- message
- String
Felmeddelandet som förklarar orsaken till undantaget.
- exception
- Exception
Undantaget som är orsaken till det aktuella undantaget. Om parametern exception inte nullär genereras det aktuella undantaget i ett catch block som hanterar det inre undantaget.
Kommentarer
Ett undantag som genereras som ett direkt resultat av ett tidigare undantag bör innehålla en referens till det tidigare undantaget i InnerException egenskapen. Egenskapen InnerException returnerar samma värde som skickas till konstruktorn, eller null om InnerException egenskapen inte anger det inre undantagsvärdet till konstruktorn.
I följande tabell visas de inledande egenskapsvärdena för en instans av PolicyException.
| Fastighet | Value |
|---|---|
| InnerException | Den inre undantagsreferensen. |
| Message | Felmeddelandesträngen. |