AbandonedMutexException Constructors

Definition

Initializes a new instance of the AbandonedMutexException class.

Overloads

AbandonedMutexException()

Initializes a new instance of the AbandonedMutexException class with default values.

AbandonedMutexException(String)

Initializes a new instance of the AbandonedMutexException class with a specified error message.

AbandonedMutexException(Int32, WaitHandle)

Initializes a new instance of the AbandonedMutexException class with a specified index for the abandoned mutex, if applicable, and a Mutex object that represents the mutex.

AbandonedMutexException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the AbandonedMutexException class with serialized data.

AbandonedMutexException(String, Exception)

Initializes a new instance of the AbandonedMutexException class with a specified error message and inner exception.

AbandonedMutexException(String, Int32, WaitHandle)

Initializes a new instance of the AbandonedMutexException class with a specified error message, the index of the abandoned mutex, if applicable, and the abandoned mutex.

AbandonedMutexException(String, Exception, Int32, WaitHandle)

Initializes a new instance of the AbandonedMutexException class with a specified error message, the inner exception, the index for the abandoned mutex, if applicable, and a Mutex object that represents the mutex.

AbandonedMutexException()

Initializes a new instance of the AbandonedMutexException class with default values.

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

Remarks

This constructor initializes the Message property of the new instance to a system-supplied message that describes the error, such as "The wait completed due to an abandoned mutex." This message takes into account the current system culture.

The following table shows the initial property values for an instance of AbandonedMutexException.

Property Value
InnerException null.
Message The system-supplied error message string.
Mutex null.
MutexIndex -1 (minus one).

See also

Applies to

AbandonedMutexException(String)

Initializes a new instance of the AbandonedMutexException class with a specified error message.

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

Parameters

message
String

An error message that explains the reason for the exception.

Remarks

The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

The following table shows the initial property values for an instance of AbandonedMutexException initialized with this constructor.

Property Value
InnerException null.
Message message.
Mutex null.
MutexIndex -1 (minus one).

See also

Applies to

AbandonedMutexException(Int32, WaitHandle)

Initializes a new instance of the AbandonedMutexException class with a specified index for the abandoned mutex, if applicable, and a Mutex object that represents the mutex.

public:
 AbandonedMutexException(int location, System::Threading::WaitHandle ^ handle);
public AbandonedMutexException (int location, System.Threading.WaitHandle handle);
public AbandonedMutexException (int location, System.Threading.WaitHandle? handle);
new System.Threading.AbandonedMutexException : int * System.Threading.WaitHandle -> System.Threading.AbandonedMutexException
Public Sub New (location As Integer, handle As WaitHandle)

Parameters

location
Int32

The index of the abandoned mutex in the array of wait handles if the exception is thrown for the WaitAny method, or -1 if the exception is thrown for the WaitOne or WaitAll methods.

handle
WaitHandle

A Mutex object that represents the abandoned mutex.

Remarks

This constructor initializes the Message property of the new instance to a system-supplied message that describes the error, such as "The wait completed due to an abandoned mutex." This message takes into account the current system culture.

The following table shows the initial property values for an instance of AbandonedMutexException initialized with this constructor.

Property Value
InnerException null.
Message A system-supplied error message string.
Mutex handle.
MutexIndex location.

See also

Applies to

AbandonedMutexException(SerializationInfo, StreamingContext)

Caution

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

Initializes a new instance of the AbandonedMutexException class with serialized data.

protected:
 AbandonedMutexException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected AbandonedMutexException (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 AbandonedMutexException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Threading.AbandonedMutexException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Threading.AbandonedMutexException
[<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.AbandonedMutexException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Threading.AbandonedMutexException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

The SerializationInfo object that holds the serialized object data about the exception being thrown.

context
StreamingContext

The StreamingContext object that contains contextual information about the source or destination.

Attributes

Remarks

This constructor is called during deserialization to reconstitute the exception object transmitted over a stream. For more information, see XML and SOAP Serialization.

See also

Applies to

AbandonedMutexException(String, Exception)

Initializes a new instance of the AbandonedMutexException class with a specified error message and inner exception.

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

Parameters

message
String

An error message that explains the reason for the exception.

inner
Exception

The exception that is the cause of the current exception. If the inner parameter is not null, the current exception is raised in a catch block that handles the inner exception.

Remarks

The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor, or null if the InnerException property does not supply the inner exception value to the constructor.

The following table shows the initial property values for an instance of AbandonedMutexException initialized with this constructor.

Property Value
InnerException inner.
Message message.
Mutex null.
MutexIndex -1 (minus one).

See also

Applies to

AbandonedMutexException(String, Int32, WaitHandle)

Initializes a new instance of the AbandonedMutexException class with a specified error message, the index of the abandoned mutex, if applicable, and the abandoned mutex.

public:
 AbandonedMutexException(System::String ^ message, int location, System::Threading::WaitHandle ^ handle);
public AbandonedMutexException (string message, int location, System.Threading.WaitHandle handle);
public AbandonedMutexException (string? message, int location, System.Threading.WaitHandle? handle);
new System.Threading.AbandonedMutexException : string * int * System.Threading.WaitHandle -> System.Threading.AbandonedMutexException
Public Sub New (message As String, location As Integer, handle As WaitHandle)

Parameters

message
String

An error message that explains the reason for the exception.

location
Int32

The index of the abandoned mutex in the array of wait handles if the exception is thrown for the WaitAny method, or -1 if the exception is thrown for the WaitOne or WaitAll methods.

handle
WaitHandle

A Mutex object that represents the abandoned mutex.

Remarks

The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

The following table shows the initial property values for an instance of AbandonedMutexException initialized with this constructor.

Property Value
InnerException null.
Message message.
Mutex handle.
MutexIndex location.

See also

Applies to

AbandonedMutexException(String, Exception, Int32, WaitHandle)

Initializes a new instance of the AbandonedMutexException class with a specified error message, the inner exception, the index for the abandoned mutex, if applicable, and a Mutex object that represents the mutex.

public:
 AbandonedMutexException(System::String ^ message, Exception ^ inner, int location, System::Threading::WaitHandle ^ handle);
public AbandonedMutexException (string message, Exception inner, int location, System.Threading.WaitHandle handle);
public AbandonedMutexException (string? message, Exception? inner, int location, System.Threading.WaitHandle? handle);
new System.Threading.AbandonedMutexException : string * Exception * int * System.Threading.WaitHandle -> System.Threading.AbandonedMutexException
Public Sub New (message As String, inner As Exception, location As Integer, handle As WaitHandle)

Parameters

message
String

An error message that explains the reason for the exception.

inner
Exception

The exception that is the cause of the current exception. If the inner parameter is not null, the current exception is raised in a catch block that handles the inner exception.

location
Int32

The index of the abandoned mutex in the array of wait handles if the exception is thrown for the WaitAny method, or -1 if the exception is thrown for the WaitOne or WaitAll methods.

handle
WaitHandle

A Mutex object that represents the abandoned mutex.

Remarks

The content of message is a text string intended to inform the user about the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor, or null if the InnerException property does not supply the inner exception value to the constructor.

The following table shows the initial property values for an instance of AbandonedMutexException initialized with this constructor.

Property Value
InnerException inner.
Message message.
Mutex handle.
MutexIndex location.

See also

Applies to