DataRowCollection::Add Method (DataRow^)
Assembly: System.Data (in System.Data.dll)
The row is null.
The row either belongs to another table or already belongs to this table.
The addition invalidates a constraint.
To create a new DataRow, you must use the NewRow method of the DataTable class. When you use the NewRow method, a new DataRow object is returned using the schema of parent DataTable. After you create the DataRow object and set the values for each of its columns, use the method to add the object to the collection.
Generates an exception if the user generates an exception in the RowChanging event. If an exception occurs, the row is not added to the table.
Available since 1.1