System.Data.ConstraintCollection.Contains Method

Indicates whether the System.Data.Constraint object specified by name exists in the collection.

Syntax

public bool Contains (string name)

Parameters

name
The Constraint.ConstraintName of the constraint.

Returns

true if the collection contains the specified constraint; otherwise, false.

Remarks

Use the ConstraintCollection.Contains(string) method to determine whether the specified System.Data.Constraint exists before trying to remove it from the collection. You can also use the ConstraintCollection.CanRemove(Constraint) method to determine whether a System.Data.Constraint can be removed.

Requirements

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