回覆列表
  • 1 # 壓抑

    //原本的兩個datatable1和datatable2DataTable DataTable1, DataTable2//兩個結構一樣的DT合併DataTable newDataTable = DataTable1.Clone();object[] obj = new object[newDataTable.Columns.Count];for (int i = 0; i < DataTable1.Rows.Count; i++){ DataTable1.Rows[i].ItemArray.CopyTo(obj,0); newDataTable.Rows.Add(obj);}for (int i = 0; i < DataTable2.Rows.Count; i++){ DataTable2.Rows[i].ItemArray.CopyTo(obj,0); newDataTable.Rows.Add(obj);}//newDataTable就是你要的了

  • 中秋節和大豐收的關聯?
  • 紅米飯南瓜湯是誰唱的?