ConstraintCollection.CanRemove Method (Constraint)
Indicates whether a Constraint can be removed.
Assembly: System.Data (in System.Data.dll)
The default behavior whenever a DataRelation is added to a DataSet, is to add a ForeignKeyConstraint to the parent table and a UniqueConstraint to the child table. The UniqueConstraint is applied to the primary key column of the parent table, and the ForeignKeyConstraint is applied to the foreign key column of the child table. Because trying to remove the UniqueConstraint before removing the ForeignKeyConstraint causes an exception to be thrown, you should always use the method before calling Remove, to make sure that the UniqueConstraint can be removed.
Available since 1.1