Edit

Share via


DuplicateKeyException Constructors

Definition

Initializes a new instance of the DuplicateKeyException class.

Overloads

DuplicateKeyException(Object)

Initializes a new instance of the DuplicateKeyException class.

DuplicateKeyException(Object, String)

Initializes a new instance of the DuplicateKeyException class by referencing the duplicate key and providing an error message.

DuplicateKeyException(Object, String, Exception)

Initializes a new instance of the DuplicateKeyException class by referencing the duplicate key, providing an error message, and specifying the exception that caused this exception to be thrown.

DuplicateKeyException(Object)

Initializes a new instance of the DuplicateKeyException class.

public:
 DuplicateKeyException(System::Object ^ duplicate);
public DuplicateKeyException (object duplicate);
new System.Data.Linq.DuplicateKeyException : obj -> System.Data.Linq.DuplicateKeyException
Public Sub New (duplicate As Object)

Parameters

duplicate
Object

The duplicate key that caused the exception to be thrown.

Applies to

DuplicateKeyException(Object, String)

Initializes a new instance of the DuplicateKeyException class by referencing the duplicate key and providing an error message.

public:
 DuplicateKeyException(System::Object ^ duplicate, System::String ^ message);
public DuplicateKeyException (object duplicate, string message);
new System.Data.Linq.DuplicateKeyException : obj * string -> System.Data.Linq.DuplicateKeyException
Public Sub New (duplicate As Object, message As String)

Parameters

duplicate
Object

The duplicate key that caused the exception to be thrown.

message
String

The message to appear when the exception is thrown.

Applies to

DuplicateKeyException(Object, String, Exception)

Initializes a new instance of the DuplicateKeyException class by referencing the duplicate key, providing an error message, and specifying the exception that caused this exception to be thrown.

public:
 DuplicateKeyException(System::Object ^ duplicate, System::String ^ message, Exception ^ innerException);
public DuplicateKeyException (object duplicate, string message, Exception innerException);
new System.Data.Linq.DuplicateKeyException : obj * string * Exception -> System.Data.Linq.DuplicateKeyException
Public Sub New (duplicate As Object, message As String, innerException As Exception)

Parameters

duplicate
Object

The duplicate key that caused the exception to be thrown.

message
String

The message to appear when the exception is thrown.

innerException
Exception

The previous exception that caused the DuplicateKeyException exception to be thrown.

Applies to