Create verbatim literal strings in CSharp

Description

The following code shows how to create verbatim literal strings.

Example


using System; //from   www .  j a v a2 s  .  c om
 
public class Verbatim {    
  public static void Main() {    
    Console.WriteLine(@"This is a verbatim 
string literal 
that spans several lines. 
"); 
    Console.WriteLine(@"Here is some tabbed output: 
1  2  3  4 
5  6  7  8 
"); 
    Console.WriteLine(@"Programmers say, ""I like C#."""); 
  }    
}

The code above generates the following result.





















Home »
  C# Tutorial »
    Data Types »




C# Data Types
Bool
Byte
Char
Decimal
Double
Float
Integer
Long
Short
String
C# Array
Array Example
Byte Array
C# Standard Data Type Format
BigInteger
Complex
Currency
DateTime
DateTimeOffset
DateTime Format Parse Convert
TimeSpan
TimeZone
Enum
Null
tuple
var