DataColumn Name from DataRow (not DataTable)

后端 未结 4 1834
暗喜
暗喜 2020-12-30 18:23

I need to iterate the columnname and column datatype from a specific row. All of the examples I have seen have iterated an entire datatable. I want to pass a single row to a

4条回答
  •  温柔的废话
    2020-12-30 19:17

    You need something like this:

    foreach(DataColumn c in dr.Table.Columns)
    {
      MessageBox.Show(c.ColumnName);
    }
    

提交回复
热议问题