更新时间:2022-12-12 11:21:40
.NET框架中的DataTable类将为您提供帮助.这是将PresentAddress表的列复制到PermanantAddress表的示例.
DataTable class in .NET framework will help you. Herez an example to copy the columns of PresentAddress table to PermanantAddress table.
DataTable PresentAddress = new DataTable();
DataTable PermanantAdress = new DataTable();
foreach (DataRow sourcerow in PresentAddress .Rows)
{
DataRow destRow = PermanantAdress.NewRow();
destRow["Name"] = sourcerow["Nam"];
destRow["Address"] = sourcerow["Addr"];
PermanantAdress.Rows.Add(destRow);
}