DataRow 数组转化成DataTable

#region 封装DataTable

DataTable dt = null;
if (newRows.Length > 0)
{
dt = newRows[0].Table.Clone(); // 复制DataRow的表结构
foreach (DataRow row in rows)
{
dt.Rows.Add(row.ItemArray); // 将DataRow添加到DataTable中
}
}

#endregion

原文地址:https://www.cnblogs.com/soundcode/p/3399323.html