Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    C# Display text in multiple lines.

    Hello..
    I need help.. I am new in C#, and want to know how I can get multiple lines in a message Box... The program consist in a form with a button that thisplays all my courses and instructors in a messagebox...when click.
    Thanks guys....
    Last edited by Amilcar; 09-13-2012 at 10:14 PM.

  • #2
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,725
    Thanks
    41
    Thanked 191 Times in 190 Posts
    when you format your string you just escape...
    *note this syntax is probably wrong, I don't have VS open
    Code:
    MessageBox.Show("The courses I have are:\nEnglish\nProgamming", "My Caption", MessageBoxButtone.OK);
    link here

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • Users who have thanked alykins for this post:

    Amilcar (09-14-2012)

  • #3
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I'll try.. thanks for your help..


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •