How do I make a label multi-line?

I need to make a text label multi-line using WinForms C# 3.5

Thanks,
newbieweb
newbiewebSr. Software EngineerAsked:
Who is Participating?
 
nmarunConnect With a Mentor Commented:
try this:

string labelText =  string.Format("This is line 1.{0}This is line 2.", Environment.NewLine);

label1.Text = labelText;
0
 
Fernando SotoConnect With a Mentor RetiredCommented:
Hi newbieweb;

use the \n when you want to begin a new line.

label1.Text = "This is the first line \nThis is a second line\nThis is the Third line";

Fernando
0
 
newbiewebSr. Software EngineerAuthor Commented:
Environment.NewLine is new to me.

Thanks,
newbieweb
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.