How To Copy A Row Of A Data Table To Another Data Table

C# Code

Temp1 is the source table from which the data to be copied.

Temp2 is the Destination table to which the data will b imported. 
  1. DataSet ds=New DataSet();
  2. Ds.Tables.Add(Temp2);
  3. DataTable Temp2=new DataTable();

  4. var row = Temp1.Rows[RowIndex]; 
  5.  if(Temp1.Rows.Count>0)
  6.    {
  7.       ds.Tables["Temp2"].ImportRow(row);  
  8.    }
  9.    else
  10.    {
  11.       // Do Something...............
  12.    }