Is there a difference between DataTable.Clear and DataTable.Rows.Clear?

后端 未结 7 1566
天涯浪人
天涯浪人 2021-01-18 06:51

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

相关标签:
7条回答
  • 2021-01-18 07:45

    There is no difference between them. DataRowCollection.Clear() calls Table.Clear()

    Table.Clear() checks that the table can be cleared (constraints can prevent this), removes the rows and rebuilds any indexes.

    0 讨论(0)
提交回复
热议问题