ConstraintCollection::IndexOf Method (Constraint^)
.NET Framework (current version)
Gets the index of the specified Constraint.
Assembly: System.Data (in System.Data.dll)
Parameters
- constraint
-
Type:
System.Data::Constraint^
The Constraint to search for.
Return Value
Type: System::Int32The zero-based index of the Constraint if it is in the collection; otherwise, -1.
The following example uses the IndexOf method to return the index of a Constraint. The index is passed to the Contains method, before it is removed, to determine whether the collection contains the constraint.
.NET Framework
Available since 1.1
Available since 1.1
Show: