c# string verbatim code example

Example 1: verbatom literal

A verbatim string literal consists of an @ character followed by a double-quote character, zero or more characters, and a closing double-quote character. ... In a verbatim string literal, the characters between the delimiters are interpreted verbatim, the only exception being a quote-escape-sequence

Example 2: c# string verbatim

//start @ character
string str = @"dont have to escape \ sign, use double "" for single  ";
//dont have to escape \ sign, use double " for single

Tags:

Misc Example