Indicates whether a System.Data.Constraint can be removed.
- constraint
- The System.Data.Constraint to be tested for removal from the collection.
true if the System.Data.Constraint can be removed from collection; otherwise, false.
The default behavior whenever a System.Data.DataRelation is added to a System.Data.DataSet, is to add a System.Data.ForeignKeyConstraint to the parent table and a System.Data.UniqueConstraint to the child table. The System.Data.UniqueConstraint is applied to the primary key column of the parent table, and the System.Data.ForeignKeyConstraint is applied to the foreign key column of the child table. Because trying to remove the System.Data.UniqueConstraint before removing the System.Data.ForeignKeyConstraint causes an exception to be thrown, you should always use the ConstraintCollection.CanRemove(Constraint) method before calling Remove, to make sure that the System.Data.UniqueConstraint can be removed.