ConstraintCollection.Add Method

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Adds a Constraint object to the collection.

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

NameDescription
System_CAPS_pubmethodAdd(Constraint)

Adds the specified Constraint object to the collection.

System_CAPS_pubmethodAdd(String, DataColumn, Boolean)

Constructs a new UniqueConstraint with the specified name, DataColumn, and value that indicates whether the column is a primary key, and adds it to the collection.

System_CAPS_pubmethodAdd(String, DataColumn, DataColumn)

Constructs a new ForeignKeyConstraint with the specified name, parent column, and child column, and adds the constraint to the collection.

System_CAPS_pubmethodAdd(String, DataColumn[], Boolean)

Constructs a new UniqueConstraint with the specified name, array of DataColumn objects, and value that indicates whether the column is a primary key, and adds it to the collection.

System_CAPS_pubmethodAdd(String, DataColumn[], DataColumn[])

Constructs a new ForeignKeyConstraint, with the specified arrays of parent columns and child columns, and adds the constraint to the collection.

Return to top
Show: