DataTableMappingCollection.Clear Method ()


Removes all DataTableMapping objects from the collection.

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

public void Clear()



The following example uses the CopyTo method to export the collection to an array of DataTableMapping objects. It then clears the collection, and returns true if the parameters are no longer persisting. This example assumes that a DataTableMappingCollection has already been created.

public void PushIntoArray() 
    // ...
    // create DataTableMappingCollection collection mappings
    // ...
    DataTableMapping[] tables = {};
    mappings.CopyTo(tables, 0);

.NET Framework
Available since 1.1
Return to top