How do I get column names to print in this C# program?
问题 I've cobbled together a C# program that takes a .csv file and writes it to a DataTable . Using this program, I can loop through each row of the DataTable and print out the information contained in the row. The console output looks like this: --- Row --- Item: 1 Item: 545 Item: 507 Item: 484 Item: 501 I'd like to print the column name beside each value, as well, so that it looks like this: --- Row --- Item: 1 Hour Item: 545 Day1 KW Item: 507 Day2 KW Item: 484 Day3 KW Item: 501 Day4 KW Can