PDA

View Full Version : c# New Line


worldhopes
07-30-2005, 04:38 PM
hello

does anyone know the command for a new line within a message box when using c#.

thanks in advance

mlseim
07-30-2005, 04:49 PM
What is c#?

This is the Perl forum ... maybe the wrong section?

nkrgupta
08-01-2005, 07:33 AM
Hi,
Try the following:

MessageBox.Show("Line 1" + Environment.NewLine + "Line 2");

OR

MessageBox.Show("Line 1\r\nLine2", "BlahBlah", MessageBoxButtons.OK, MessageBoxIcon.Question);

OR

string CrLf = "\r\n";
MessageBox.Show("line 1" + CrLf + "line 2");

Cheers

cf2sg
08-03-2005, 05:10 AM
"\r\n" almost become the standard for most programming language to represent line break literal

worldhopes
08-04-2005, 01:00 PM
Hello, sorry it took me so long to reply to your post.

Thank you very much for answering my question I really appreciate it.

Ciao Craig