DataColumnCollection.Clear Methode

Definitie

Hiermee wist u de verzameling kolommen.

public:
 void Clear();
public void Clear();
member this.Clear : unit -> unit
Public Sub Clear ()

Voorbeelden

In het volgende voorbeeld wordt de verzameling kolommen gewist.


private void ClearColumnsCollection(DataTable table)
{
    DataColumnCollection columns;
    // Get the DataColumnCollection from a
    // DataTable in a DataSet.
    columns = table.Columns;
    columns.Clear();
}
 Private Sub ClearColumnsCollection(table As DataTable)
     Dim columns As DataColumnCollection
     ' Get the DataColumnCollection from a 
     ' DataTable in a DataSet.
     columns = table.Columns
     columns.Clear()
End Sub

Opmerkingen

Als de verzameling is gewijzigd door kolommen toe te voegen of te verwijderen, vindt de CollectionChanged gebeurtenis plaats.

Van toepassing op