Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法使用克隆方法从数据表中仅复制几列模式?如果不是,将带有架构的几列从一个数据表复制到另一个数据表的最佳解决方案是什么。
你应该使用,
DataTable newTable = dataTable.DefaultView.ToTable(false, columnsnamearray);