Best way Copying DataRow from one table to another table?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What is the best way to copy DataRow from one table to another table,
without copying its structure, which means copying only its data.
 
I'd do it this way:

DataRow row;
row=MyDataTable.NewRow();
row.ItemArray=OtherDataTableDataRow.ItemArray;
MyDataTable.Rows.Add(row);


Cheers
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top