//list是datatable类型
for (int i = 0; i < list.Rows.Count; i++) { var A = list.Rows[i]["列名"].ToString(); var B = list.Rows[i]["ID"].ToString(); }