Multi-Line statement

How to write statements running into multi-lines in C#, like using "_" in vb6.


Answer this question

Multi-Line statement

  • steveQ56

    Thank you :)

  • Paweł

    Just do it.  You can use as many lines as you like, so long as you're not inside a string literal at the time.

     



  • Teetime

    Here are some examples.


    string myString = "Please, this is line1. " +
    "here is line2";

    string message = ( status > 0
                       "Done" :
                       "Error" );

    MyMethod( myString,
              message,
              null );

     



  • Multi-Line statement