To add a new row to a DataTable, you can use the ___________ method.
- AddNewRow()
- CreateRow()
- InsertRow()
- NewRow()
The NewRow() method of the DataTable class is used to create a new DataRow with the same schema as the DataTable. This method creates a new DataRow instance but does not add it to the DataRow collection. It simply returns a reference to the new DataRow, which you can then manipulate and add to the DataTable using the Add() method.
Loading...
Related Quiz
- How can you specify a connection string in a .NET application configuration file?
- Which ADO.NET object is responsible for managing transactions?
- In ADO.NET, what is an optimistic concurrency model?
- Scenario: You are working with a dataset containing customer orders and order details in a hierarchical structure. How would you use DataRelations to retrieve order details for a specific customer's orders?
- What is two-way data binding in ADO.NET, and how does it differ from one-way data binding?