代码:
DataTable dataTable = new DataTable();标签:Rows,列头,dataTable,dataRow,小写,datatable From: https://www.cnblogs.com/IBPM/p/17408676.html
dataTable.Columns.Add("ID");
DataRow dataRow = dataTable.NewRow();
dataRow.ItemArray = new[] {"111"};
dataTable.Rows.Add(dataRow);
Console.WriteLine(dataTable.Rows[0]["id"].ToString());//111
Console.WriteLine(dataTable.Rows[0]["ID"].ToString());//111
结论:datatable中的列头是不区分大小的,== 大写小写均可。