This documentation is archived and is not being maintained.

DuplicateKeyException Constructor (Object, String)

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

Namespace:  System.Data.Linq
Assembly:  System.Data.Linq (in System.Data.Linq.dll)

public DuplicateKeyException(
	Object duplicate,
	string message
)

Parameters

duplicate
Type: System.Object

The duplicate key that caused the exception to be thrown.

message
Type: System.String

The message to appear when the exception is thrown.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5
Show: