string columnname = "Name";
DataTable myTable; -- don't forget to initialize datatable
foreach(Datarow row in myTable.Rows){
Console.WriteLine(row[columnname]);
}
Haven't tested it, but it shouldn't be far off.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP