This is a bit of an odd question, and I'm sure there was an easier way of doing this but...
I have a method that returns a List of names. I am parsing through this list with a foreach loop. I am adding each name to one long String so that I can set the text of a Table Cell to that string. But I can't seem to get it to add a new line. Is this possible?
Here's a snippet of the code:
Earlier my table loop:
TableCell tempCell = new TableCell();
The issue:
// Returns a List of Employees on the specified day and time.
List<string> EmployeeList = CheckForEmployees(currentDay, timeCount);
string PrintedList = "";
foreach (String s in EmployeeList)
{
PrintedList += s;
// PrintedList += s + System.Environment.NewLine;
// PrintedList += s + " \n";
}
tempCell.Text = PrintedList;
Both the commented code lines didn't work. Any ideas?
tag. – Charls Mar 15 '14 at 23:45