且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

c#datatable在0位置插入列

更新时间:2022-11-02 23:10:40

您可以使用以下将代码添加到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;