I'm trying to populate a textbox with 5 names. Each name needs to go on it's own line like this:
Tim
Lance
Richard...
...and so on.
This is not a console app. It's a GUI and I'm having problems getting each name to go on it's own line. Here is my current code:
Tim
Lance
Richard...
...and so on.
This is not a console app. It's a GUI and I'm having problems getting each name to go on it's own line. Here is my current code:
C#:
private void btnAddNames_Click(object sender, EventArgs e)
{
string[] names = { "Tim, Shawn, Lance, Jerry, Richard" };
int x;
for (x = 0; x < names.Length; x++)
txtUnsortedNames.Text = names[0] + "\r\n";
}