c#datatable在0位置插入列 [英] c# datatable insert column at position 0
本文介绍了c#datatable在0位置插入列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有人知道在位置0的数据表中插入列的最佳方式?
does anyone know the best way to insert a column in a datatable at position 0?
推荐答案
您可以使用以下将代码添加到Datatable的位置0:
You can use the following code to add column to Datatable at postion 0:
DataColumn Col = datatable.Columns.Add("Column Name", System.Type.GetType("System.Boolean"));
Col.SetOrdinal(0);// to put the column in position 0;
这篇关于c#datatable在0位置插入列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文