Answer:
We can use DataTable'Copy() method to have all the columns as well as rows into another dataTable.
For Example:-
DataTable dt_new = new DataTable();
dt_new = dt_employee.Copy();
Here,dt_employee is our another DataTable which contains Columns as well as Rows.
So here,dt_new DataTable will be assigned with all the Columns and Rows.
Asked In: Many Interviews |
Alert Moderator