The semantics are different: DataSet.Clear
deletes all the data (rows), but keeps the schema (tables and relations).
In your sample, it looks like the tables are being created from the ReadXml method (which can read schema as well as data).
DataSet.Clear
would probably work as long as you are certain all Xml documents have the same schema, but using New
is more robust and expresses your intent better.
However if you were reading data only, as in the following sample, DataSet.Clear
might be a better choice as it avoids you repeatedly generating the schema.
ds = New DataSet
... code to create the schema (Tables, Columns, Relations)
For Each row in GridView
ds.ReadXML(GetStream(row.Field), XmlReadMode.IgnoreSchema)
... export the dataset
ds.Clear
Next