📜  c# 循环遍历数据表 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:22.310000             🧑  作者: Mango

代码示例1
DataTable dt = new DataTable();

SqlDataAdapter adapter = new SqlDataAdapter(cmd);

adapter.Fill(dt);

foreach(DataRow row in dt.Rows)
{
    TextBox1.Text = row["ImagePath"].ToString();
}