C # How to copy the column names in a DataTable to another DataTable

C # How to copy the column names in a DataTable to another DataTable?

Copy only the column names, data in the columns are not replicated:

var newDt = new DataTable();
newDt = oldDataTable.Clone();//克隆的结构DataTable,包括所有DataTable架构和约束。

Guess you like

Origin www.cnblogs.com/muzhuang/p/11846970.html