c# datatable copy selected rows to another table

C#
foreach (DataRow dr in dataTable1.Rows) {
    if (/* some condition */)
        dataTable2.Rows.Add(dr.ItemArray);
}
Source

Also in C#: