I want to display values or write them to a text file that it is written as such from a data set
ColumnID columnName ColumnFamilyName
ValueOne ValueTwo ValueThree
ValueThree ValueFour ValueFive
ValueSix ValueSeven ValueEight
I have done this which does not do the trick
foreach (DataRow row in myTopTenData.Rows)
{
Console.WriteLine();
foreach (DataColumn col in myTopTenData.Columns)
{
Console.Write(row[0].ToString() + " ");
}
}
How can I do this?
I still can’t post a comment but here is a quick answer:
Make sure to check for
nullvalues when retrieving the data