I am having trouble with text formatting while trying to output my array into a textbox.
I'm required to output something like this; https://i.sstatic.net/sX6AI.jpg sort of like a table minus the borders.
Ive managed to produce something similar, but i'm out of ideas. https://i.sstatic.net/rvAUY.jpg
My code is:
string[,] toys = new string[5, 4];
for (int week = 0; week <= 3; week++)
{
for (int day = 0; day <= 4; day++)
{
toys[day, week] = Microsoft.VisualBasic.Interaction.InputBox("Please enter value for Day " + Convert.ToString(day + 1) + " in week " + Convert.ToString(week + 1) + ".");
}
}
txtOutput.Text += "Mon" + "\t" + "Tue" + "\t" + "Wed" + "\t" + "Thu" + "\t" + "Fri" + "\t" + "\r\n";
txtOutput.Text += "Week 1" + "\t" + "\r\n";
txtOutput.Text += "Week 2" + "\t" + "\r\n";
txtOutput.Text += "Week 3" + "\t" + "\r\n";
txtOutput.Text += "Week 4" + "\t" + "\r\n";
foreach (string text in toys)
{
txtOutput.Text += text + "\t";
}
"Mon" + "\t"instead of"Mon \t"?