I want to output the results of my program in a nice looking table. With table I mean the files listed among themselves then a tabulator and the score listed among themselves. How can I achieve that this works so? At the moment my program is able to print out ONE file at a time but ALL other scores among themselves. The result should look like this:
file1 score1
file2 score2
file3 score3
But at the moment it looks like this:
file1 score1
score2
score3
file2 score1
score2
score3
I think the 2nd foreach
is wrong but how can I output one element of a list without for/foreach
?
Thats my code:
List<string> _fileNameList = new List<string>();
List<double> _counterFleschScore = new List<double>();
string _fileNameList
foreach (string files in _fileNameList)
{
Console.Write(files + "\t\t\t\t");
foreach (double listingFleschScore in _counterFleschScore)
{
Console.Write("{0:N1}", listingFleschScore);
Console.WriteLine("");
}
}