ContextMarshalException 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 ContextMarshalException klassen.
Överlagringar
| Name | Description |
|---|---|
| ContextMarshalException() |
Initierar en ny instans av ContextMarshalException klassen med standardegenskaper. |
| ContextMarshalException(String) |
Initierar en ny instans av ContextMarshalException klassen med ett angivet felmeddelande. |
| ContextMarshalException(SerializationInfo, StreamingContext) |
Föråldrad.
Initierar en ny instans av ContextMarshalException klassen med serialiserade data. |
| ContextMarshalException(String, Exception) |
Initierar en ny instans av ContextMarshalException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till det här undantaget. |
ContextMarshalException()
- Källa:
- Context.cs
- Källa:
- Context.cs
- Källa:
- Context.cs
- Källa:
- Context.cs
- Källa:
- Context.cs
Initierar en ny instans av ContextMarshalException klassen med standardegenskaper.
public:
ContextMarshalException();
public ContextMarshalException();
Public Sub New ()
Kommentarer
I följande tabell visas de inledande egenskapsvärdena för en instans av ContextMarshalException.
| Fastighet | Value |
|---|---|
| InnerException |
null. |
| Message | Den tomma strängen (""). |
Gäller för
ContextMarshalException(String)
- Källa:
- Context.cs
- Källa:
- Context.cs
- Källa:
- Context.cs
- Källa:
- Context.cs
- Källa:
- Context.cs
Initierar en ny instans av ContextMarshalException klassen med ett angivet felmeddelande.
public:
ContextMarshalException(System::String ^ message);
public ContextMarshalException(string? message);
public ContextMarshalException(string message);
new ContextMarshalException : string -> ContextMarshalException
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 ContextMarshalException.
| Fastighet | Value |
|---|---|
| InnerException |
null. |
| Message | Felmeddelandesträngen. |
Gäller för
ContextMarshalException(SerializationInfo, StreamingContext)
- Källa:
- Context.cs
- Källa:
- Context.cs
- Källa:
- Context.cs
- Källa:
- Context.cs
- Källa:
- Context.cs
Varning
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
Initierar en ny instans av ContextMarshalException klassen med serialiserade data.
protected:
ContextMarshalException(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 ContextMarshalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected ContextMarshalException(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 ContextMarshalException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> ContextMarshalException
new ContextMarshalException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> ContextMarshalException
Protected Sub New (info As SerializationInfo, context As StreamingContext)
Parametrar
- info
- SerializationInfo
Det SerializationInfo som innehåller serialiserade objektdata om undantaget som genereras.
- context
- StreamingContext
Som StreamingContext innehåller kontextuell information om källan eller målet.
- Attribut
Gäller för
ContextMarshalException(String, Exception)
- Källa:
- Context.cs
- Källa:
- Context.cs
- Källa:
- Context.cs
- Källa:
- Context.cs
- Källa:
- Context.cs
Initierar en ny instans av ContextMarshalException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till det här undantaget.
public:
ContextMarshalException(System::String ^ message, Exception ^ inner);
public ContextMarshalException(string? message, Exception? inner);
public ContextMarshalException(string message, Exception inner);
new ContextMarshalException : string * Exception -> ContextMarshalException
Public Sub New (message As String, inner As Exception)
Parametrar
- message
- String
Felmeddelandet som förklarar orsaken till undantaget.
- inner
- Exception
Undantaget som är orsaken till det aktuella undantaget. Om parametern inner 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 ContextMarshalException.
| Fastighet | Value |
|---|---|
| InnerException | Den inre undantagsreferensen. |
| Message | Felmeddelandesträngen. |