3.6.Escape Sequences

You may be now wondering how you could represent a backslash character in your code.

We have to escape that too by typing two backslashes, as in ‘\\’.

C# Character Escape Sequences
Escape Sequence Meaning
\’ Single Quote
\” Double Quote
\\ Backslash
\0 Null, not the same as the C# null value
\a Bell
\b Backspace
\f form Feed
\n Newline
\r Carriage Return
\t Horizontal Tab
\v Vertical Tab

 

Yes No Suggest edit
Suggest Edit