DataTableCollection.RemoveAt Method (Int32)

 

Removes the DataTable object at the specified index from the collection.

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

member RemoveAt : 
        index:int -> unit

Parameters

index
Type: System.Int32

The index of the DataTable to remove.

Exception Condition
ArgumentException

The collection does not have a table at the specified index.

The CollectionChanged event occurs when a table is successfully removed.

The following example uses the Contains and CanRemove methods to test whether a table exists with the index 10. If so, the RemoveAt method is called to remove the table.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: