<xml></xml>

Collapse All Expand All Code: All Code: Multiple Code: C# Code: Visual Basic Code: Visual C++

Berkeley DB .NET API Documentation
HashCursor..::.AddUnique Method
HashCursor Class See Also Send Feedback

Insert the specified key/data pair into the database, unless a key/data pair comparing equally to it already exists in the database.

Namespace: BerkeleyDB
Assembly: libdb_dotnet60 (in libdb_dotnet60.dll) Version: 6.0.30.0

# Syntax

C#

    public void AddUnique(
    	KeyValuePair<DatabaseEntry, DatabaseEntry> pair
    )

Visual Basic (Declaration)

    Public Sub AddUnique ( _
    	pair As KeyValuePair(Of DatabaseEntry, DatabaseEntry) _
    )

Visual C++

    public:
    void AddUnique(
    	KeyValuePair<DatabaseEntry^, DatabaseEntry^> pair
    )

#### Parameters

pair
  Type: System.Collections.Generic..::.KeyValuePair<(Of <(DatabaseEntry, DatabaseEntry>)>)
  The key/data pair to be inserted

# Exceptions

Exception | Condition
--- | ---
BerkeleyDB..::.KeyExistException | Thrown if a matching key/data pair already exists in the database.

# See Also

HashCursor Class
BerkeleyDB Namespace