How to copy DataRow to DataTable in

Introduction: In previous articles i explained How to Copy one DataTable to another in and  Difference between DataSet and DataTable in and How to bind gridview using DataReader,SqlCommand and Stored procedure in

 In this article i will explain how you can  copy DataRow to DataTable in

C#.Net Code to copy DataRow to DataTable in

DataRow[] dr= new DataRow[10];
DataTable dt= new DataTable();
dt.LoadDataRow(dr, true);

VB.Net Code  to copy DataRow to DataTable in

Dim dr As DataRow() = New DataRow(9) {}
Dim dt As New DataTable()
dt.LoadDataRow(dr, True)

Next Post »

If you have any question about any post, Feel free to ask.You can simply drop a comment below post or contact via Contact Us form. Your feedback and suggestions will be highly appreciated. Also try to leave comments from your account not from the anonymous account so that i can respond to you easily..