更新时间:2023-12-01 15:00:16
这将获得表中的第一列(如果没有列,则为null).
This gets the first column in the table (or null if there are no columns).
DataColumn firstColumn = dataTable.Columns.FirstOrDefault();
string name = "UNKNOWN";
if (firstColumn != null)
{
name = firstColumn.ColumnName;
}
http://makeadvice.com/blog/?p= 148 [ ^ ]