日期:2014-05-17 浏览次数:20507 次
DataTable dt = new DataTable();
string[] colname=new string[dt.Columns.Count ];
for (int i = 0; i < dt.Columns.Count; i++)
{
colname[i] = dt.Columns[i].ColumnName.ToString();
}
for (int i = 0; i < colname.Length ; i++)
{
MessageBox.Show ( colname[i] );
}