Szerkesztés

Megosztás a következőn keresztül:


WaitHandleCannotBeOpenedException Constructors

Definition

Initializes a new instance of the WaitHandleCannotBeOpenedException class.

Overloads

WaitHandleCannotBeOpenedException()

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

WaitHandleCannotBeOpenedException(String)

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

WaitHandleCannotBeOpenedException(SerializationInfo, StreamingContext)
Obsolete.

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

WaitHandleCannotBeOpenedException(String, Exception)

Initializes a new instance of the WaitHandleCannotBeOpenedException class with a specified error message and a reference to the inner exception that is the cause of this exception.

WaitHandleCannotBeOpenedException()

Source:
WaitHandleCannotBeOpenedException.cs
Source:
WaitHandleCannotBeOpenedException.cs
Source:
WaitHandleCannotBeOpenedException.cs

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

public:
 WaitHandleCannotBeOpenedException();
public WaitHandleCannotBeOpenedException ();
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 "No handle of the given name exists." This message takes into account the current system culture.

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

Property Value
InnerException null.
Message The system-supplied error message string.

Applies to

WaitHandleCannotBeOpenedException(String)

Source:
WaitHandleCannotBeOpenedException.cs
Source:
WaitHandleCannotBeOpenedException.cs
Source:
WaitHandleCannotBeOpenedException.cs

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

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

Parameters

message
String

The 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 WaitHandleCannotBeOpenedException initialized with this constructor.

Property Value
InnerException null.
Message message.

Applies to

WaitHandleCannotBeOpenedException(SerializationInfo, StreamingContext)

Source:
WaitHandleCannotBeOpenedException.cs
Source:
WaitHandleCannotBeOpenedException.cs
Source:
WaitHandleCannotBeOpenedException.cs

Caution

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

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

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

Applies to

WaitHandleCannotBeOpenedException(String, Exception)

Source:
WaitHandleCannotBeOpenedException.cs
Source:
WaitHandleCannotBeOpenedException.cs
Source:
WaitHandleCannotBeOpenedException.cs

Initializes a new instance of the WaitHandleCannotBeOpenedException class with a specified error message and a reference to the inner exception that is the cause of this exception.

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

Parameters

message
String

The error message that explains the reason for the exception.

innerException
Exception

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

Remarks

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.

Applies to