Verbatim Strings : Verbatim literal strings : String C# Examples


C# Examples » String » Verbatim literal strings »

 

Verbatim Strings





A verbatim string literal begins with an @, which is followed by a quoted string.
The contents of the quoted string are accepted without modification and can span two or more lines.




    
using  System;

class  MainClass
{
        public  static  void  Main()
        {
                string  s  =  @"
                C:  asdfasdf
                O:  'Miss'  &
                C:  asdfasdf";
                
                Console.WriteLine(s);
        }
}
    
   
  
   



Output

C: asdfasdf
        O: 'Miss' &
        C: asdfasdf


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo String
» Verbatim literal strings