I recall there is a difference between some methods/properties called directly on the DataTable class, and the identically named methods/properties on the DataTable.Rows pro
AFAIK, the main difference between datatable.clear
and datatable.rows.clear
, is that datatable.clear
clears both rows and columns. So if you want to keep the table structure (i.e. columns), use datatable.rows.clear
. And if you want to start from scratch, use datatable.clear
, or even datatable.reset
to go right back to the beginning.
datatable.reset
is effectively the next level up from datatable.clear
. Using datatable.clear
will fail if there are any constraints applied that would be violated, but using datatable.reset
will get rid of anything and everything that has been put in place since the datatable was created.