DataTable复制DataRow的方法
  1.用DataRow.ItemArray
  DataTable t=new DataTable();
  DataRow r=t.NewRow();
  r.ItemArray=oldRow.ItemArray;
  t.Rows.Add(r);
  
  2.用DataTable.ImportRow()
  t.ImportRow(oldRow);
  如此不会发生“此行已属于另一个表”


DataTable复制DataRow的方法DataTable复制DataRow的方法

相关文章:

  • 2022-12-23
  • 2021-07-29
  • 2021-11-18
  • 2021-09-02
  • 2021-07-14
  • 2022-01-05
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-09
  • 2021-07-04
  • 2022-01-06
相关资源
相似解决方案