SynchronizationLockException Konstruktorer

Definition

Initierar en ny instans av SynchronizationLockException klassen.

Överlagringar

Name Description
SynchronizationLockException()

Initierar en ny instans av SynchronizationLockException klassen med standardegenskaper.

SynchronizationLockException(String)

Initierar en ny instans av SynchronizationLockException klassen med ett angivet felmeddelande.

SynchronizationLockException(SerializationInfo, StreamingContext)
Föråldrad.

Initierar en ny instans av SynchronizationLockException klassen med serialiserade data.

SynchronizationLockException(String, Exception)

Initierar en ny instans av SynchronizationLockException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till det här undantaget.

SynchronizationLockException()

Källa:
SynchronizationLockException.cs
Källa:
SynchronizationLockException.cs
Källa:
SynchronizationLockException.cs
Källa:
SynchronizationLockException.cs
Källa:
SynchronizationLockException.cs

Initierar en ny instans av SynchronizationLockException klassen med standardegenskaper.

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

Kommentarer

I följande tabell visas de inledande egenskapsvärdena för en instans av SynchronizationLockException.

Fastighet Value
InnerException null.
Message Den lokaliserade felmeddelandesträngen.

Gäller för

SynchronizationLockException(String)

Källa:
SynchronizationLockException.cs
Källa:
SynchronizationLockException.cs
Källa:
SynchronizationLockException.cs
Källa:
SynchronizationLockException.cs
Källa:
SynchronizationLockException.cs

Initierar en ny instans av SynchronizationLockException klassen med ett angivet felmeddelande.

public:
 SynchronizationLockException(System::String ^ message);
public SynchronizationLockException(string message);
public SynchronizationLockException(string? message);
new System.Threading.SynchronizationLockException : string -> System.Threading.SynchronizationLockException
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 SynchronizationLockException.

Fastighet Value
InnerException null.
Message Felmeddelandesträngen.

Gäller för

SynchronizationLockException(SerializationInfo, StreamingContext)

Källa:
SynchronizationLockException.cs
Källa:
SynchronizationLockException.cs
Källa:
SynchronizationLockException.cs
Källa:
SynchronizationLockException.cs
Källa:
SynchronizationLockException.cs

Varning

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

Initierar en ny instans av SynchronizationLockException klassen med serialiserade data.

protected:
 SynchronizationLockException(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 SynchronizationLockException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected SynchronizationLockException(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.Threading.SynchronizationLockException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Threading.SynchronizationLockException
new System.Threading.SynchronizationLockException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Threading.SynchronizationLockException
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

Kommentarer

Den här konstruktorn anropas under deserialiseringen för att återskapa undantagsobjektet som överförs via en ström. Mer information finns i XML- och SOAP-serialisering.

Se även

Gäller för

SynchronizationLockException(String, Exception)

Källa:
SynchronizationLockException.cs
Källa:
SynchronizationLockException.cs
Källa:
SynchronizationLockException.cs
Källa:
SynchronizationLockException.cs
Källa:
SynchronizationLockException.cs

Initierar en ny instans av SynchronizationLockException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till det här undantaget.

public:
 SynchronizationLockException(System::String ^ message, Exception ^ innerException);
public SynchronizationLockException(string message, Exception innerException);
public SynchronizationLockException(string? message, Exception? innerException);
new System.Threading.SynchronizationLockException : string * Exception -> System.Threading.SynchronizationLockException
Public Sub New (message As String, innerException As Exception)

Parametrar

message
String

Felmeddelandet som förklarar orsaken till undantaget.

innerException
Exception

Undantaget som är orsaken till det aktuella undantaget. Om parametern innerException 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 SynchronizationLockException.

Fastighet Value
InnerException Den inre undantagsreferensen.
Message Felmeddelandesträngen.

Se även

Gäller för