Mega Code Archive

 
Categories / C# Tutorial / String
 

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);     } } C: asdfasdf O: 'Miss' & C: asdfasdf