datatable dt = new datatable foreach(var row in dt.rows.cast<datarow>()) { } 转载于:https://www.cnblogs.com/zhangxiaoshuai/p/5257020.html