c# Escape sequence code example
Example 1: c# Escape sequence
| Escape sequence | Meaning |
\\ \ character
\' ' character
\" " character
\? ? character
\a Alert or bell
\b Backspace
\f Form feed
\n Newline
\r Carriage return
\t Horizontal tab
\v Vertical tab
\xhh . . . Hexadecimal number of one or more digits
Example 2: c# escape characters
\' – single quote, needed for character literals
\" – double quote, needed for string literals
\\ – backslash
\0 – Unicode character 0
\a – Alert (character 7)
\b – Backspace (character 8)
\f – Form feed (character 12)
\n – New line (character 10)
\r – Carriage return (character 13)
\t – Horizontal tab (character 9)
\v – Vertical quote (character 11)
Example 3: c# Escape sequence
\’ – Output a Single quote
\” – Output a double quote
\ – Output a Backslash
\n – Insert a newline
\r – Insert a carriage-return
\t – Insert a tab
\0 – Insert a null character
\b – Insert a backspace