Which method is typically used to add a new row of data to a DataTable in a dataset?

  • AddNew()
  • NewRow()
  • InsertRow()
  • CreateRow()
The correct option is NewRow(). This method is used to create a new DataRow object with the same schema as the DataTable but without adding it to the table. It is commonly used to prepare a new row for insertion into the DataTable. The AddNew() method is used in BindingSource to add a new row, InsertRow() and CreateRow() are not valid methods in ADO.NET.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *