How to loop through the values of a particular column in datatable?

前端 未结 3 701
不思量自难忘°
不思量自难忘° 2021-01-15 01:00

I want to loop through the values of a particular column in datatable? can anyone please give the C# coding?

3条回答
  •  情话喂你
    2021-01-15 01:56

    DataTable tbl = new DataTable();
    foreach (DataRow row in tbl.Rows)
    {
        object cellData = row["colName"];
    }
    

提交回复
热议问题