Επεξεργασία

Κοινή χρήση μέσω


DuplicateWaitObjectException Constructors

Definition

Initializes a new instance of the DuplicateWaitObjectException class.

Overloads

DuplicateWaitObjectException()

Initializes a new instance of the DuplicateWaitObjectException class.

DuplicateWaitObjectException(String)

Initializes a new instance of the DuplicateWaitObjectException class with the name of the parameter that causes this exception.

DuplicateWaitObjectException(SerializationInfo, StreamingContext)
Obsolete.

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

DuplicateWaitObjectException(String, Exception)

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

DuplicateWaitObjectException(String, String)

Initializes a new instance of the DuplicateWaitObjectException class with a specified error message and the name of the parameter that causes this exception.

DuplicateWaitObjectException()

Source:
DuplicateWaitObjectException.cs
Source:
DuplicateWaitObjectException.cs
Source:
DuplicateWaitObjectException.cs

Initializes a new instance of the DuplicateWaitObjectException class.

public:
 DuplicateWaitObjectException();
public DuplicateWaitObjectException ();
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 "Duplicate objects in argument." This message takes into account the current system culture.

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

Property Value
InnerException A null reference (Nothing in Visual Basic).
Message The localized error message string.

Applies to

DuplicateWaitObjectException(String)

Source:
DuplicateWaitObjectException.cs
Source:
DuplicateWaitObjectException.cs
Source:
DuplicateWaitObjectException.cs

Initializes a new instance of the DuplicateWaitObjectException class with the name of the parameter that causes this exception.

public:
 DuplicateWaitObjectException(System::String ^ parameterName);
public DuplicateWaitObjectException (string? parameterName);
public DuplicateWaitObjectException (string parameterName);
new DuplicateWaitObjectException : string -> DuplicateWaitObjectException
Public Sub New (parameterName As String)

Parameters

parameterName
String

The name of the parameter that caused the exception.

Remarks

The content of parameterName is intended to be understood by humans.

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

Property Value
InnerException A null reference (Nothing in Visual Basic).
Message The localized error message string.
ParamName The parameter name string.

Applies to

DuplicateWaitObjectException(SerializationInfo, StreamingContext)

Source:
DuplicateWaitObjectException.cs
Source:
DuplicateWaitObjectException.cs
Source:
DuplicateWaitObjectException.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 DuplicateWaitObjectException class with serialized data.

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

Parameters

info
SerializationInfo

The object that holds the serialized object data.

context
StreamingContext

The 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

DuplicateWaitObjectException(String, Exception)

Source:
DuplicateWaitObjectException.cs
Source:
DuplicateWaitObjectException.cs
Source:
DuplicateWaitObjectException.cs

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

public:
 DuplicateWaitObjectException(System::String ^ message, Exception ^ innerException);
public DuplicateWaitObjectException (string? message, Exception? innerException);
public DuplicateWaitObjectException (string message, Exception innerException);
new DuplicateWaitObjectException : string * Exception -> DuplicateWaitObjectException
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 to this constructor.

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

Property Value
InnerException The exception specified by innerException.
Message The error message string specified by message.

Applies to

DuplicateWaitObjectException(String, String)

Source:
DuplicateWaitObjectException.cs
Source:
DuplicateWaitObjectException.cs
Source:
DuplicateWaitObjectException.cs

Initializes a new instance of the DuplicateWaitObjectException class with a specified error message and the name of the parameter that causes this exception.

public:
 DuplicateWaitObjectException(System::String ^ parameterName, System::String ^ message);
public DuplicateWaitObjectException (string? parameterName, string? message);
public DuplicateWaitObjectException (string parameterName, string message);
new DuplicateWaitObjectException : string * string -> DuplicateWaitObjectException
Public Sub New (parameterName As String, message As String)

Parameters

parameterName
String

The name of the parameter that caused the exception.

message
String

The message that describes the error.

Remarks

The content of the parameterName and message parameters is intended to be understood by humans. The caller of this constructor is required to ensure that these strings have 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 a null reference (Nothing in Visual Basic) 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 DuplicateWaitObjectException.

Property Value
InnerException A null reference (Nothing in Visual Basic)
Message The error message string.
ParamName The parameter name string.

See also

Applies to