【发布时间】:2011-08-04 04:36:20
【问题描述】:
我想在不明确指定数据类型和列名的情况下从数据表中读取列值。
例如
int carId = CarTable.Rows[i].Field<int>("CarId"); //this requires the data type and column name.
string name= CarTable.Rows[i].Field<string>("Name");
我想在不明确指定数据类型和列名的情况下读取 carId。
如果我希望所有列的返回类型都是字符串类型会更容易吗?
【问题讨论】: