Assuming myTopTenData is a DataTable, then you loop in datatable strings this way
foreach (DataRow row in myTopTenData.Rows) { Console.WriteLine(); for(int x = 0; x < myTopTenData.Columns.Count; x++) { Console.Write(row[x].ToString() + " "); } }
Of course, this fragment should be considered only as a trivial example.
You need to consider zero values ββand reliable error checking.
Steve source share