Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataSet::Clear Method ()

 

Clears the DataSet of any data by removing all rows in all tables.

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

public:
void Clear()

If the DataSet is bound to an XmlDataDocument, calling DataSet::Clear or DataTable::Clear raises the NotSupportedException. To avoid this situation, traverse each table, removing each row one at a time.

The following example clears the DataSet of all rows in all tables.

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

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