White space is preserved with verbatim strings. : At « Language Basics « C# / C Sharp






White space is preserved with verbatim strings.

 
using System;
using System.Text;

class StringApp {
    static void Main(string[] args) {
        string myLongString = @"This is a very
            very 
            very 
            long string";
        Console.WriteLine(myLongString);

    }
}

 








Related examples in the same category

1.Demonstrate an @ identierDemonstrate an @ identier
2.The @ prefix turns off the processing of escape characters.