Web Analytics Made Easy -
StatCounter c# New Line - CodingForum

Announcement

Collapse
No announcement yet.

c# New Line

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • c# New Line

    hello

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

    thanks in advance
    Bhapy

  • #2
    What is c#?

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

    Comment


    • #3
      Hi,
      Try the following:

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

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

      Code:
      string CrLf = "\r\n"; 
      MessageBox.Show("line 1" + CrLf + "line 2");
      Cheers
      My 1st JAPH!

      Comment


      • #4
        "\r\n" almost become the standard for most programming language to represent line break literal

        Comment


        • #5
          Thank You

          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
          Bhapy

          Comment

          Working...
          X