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
You would still need to go through the DataTable class. But you can do so using your DataRow instance by using the Table property.
DataTable
DataRow
foreach (DataColumn c in dr.Table.Columns) //loop through the columns. { MessageBox.Show(c.ColumnName); }