White space is preserved with verbatim strings : Escape sequences « Data Type « C# / CSharp Tutorial






using System;
using System.Collections.Generic;
using System.Text;


  class Program
  {
    static void Main(string[] args)
    {
      // White space is preserved with verbatim strings.
      string myLongString = @"This is a very
                 very 
                      very 
                           long string";
      Console.WriteLine(myLongString);
    }
  }








2.19.Escape sequences
2.19.1.Special characters
2.19.2.Escape sequences in strings: \n (new line)
2.19.3.Escape sequences in strings: \t (tab)
2.19.4.Escape sequences in strings: embed quotes
2.19.5.Character escape sequence: \0
2.19.6.Escape Characters
2.19.7.The following string is printed verbatim thus, all escape characters are displayed.
2.19.8.White space is preserved with verbatim strings