Clear Method

ConstraintCollection.Clear Method ()

 

Clears the collection of any Constraint objects.

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

public void Clear()

The CollectionChanged event occurs if this action is successful.

The following example clears all constraints from the ConstraintCollection.


public static void ClearConstraints(DataSet dataSet) 
{
   foreach (DataTable table in dataSet.Tables)
     table.Constraints.Clear();
}

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft