System.Data.ConstraintCollection.Add Method

Adds the specified System.Data.Constraint object to the collection.

Syntax

public void Add (Constraint constraint)

Parameters

constraint
The Constraint to add.

Returns

A new System.Data.UniqueConstraint or System.Data.ForeignKeyConstraint.

Remarks

If the collection is successfully changed by adding or removing constraints, the ConstraintCollection.CollectionChanged event occurs.

Requirements

Namespace: System.Data
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0