Like Java, a char in C# is a 16-bit Unicode character instead of the traditional 8-bit ASCII character of older programming languages. Table 9.5 shows escape the sequences supported by C# which can be used in character assignments or within string literals.
Escape sequence | Character represented | Comments |
---|---|---|
' | single quote | Same as in Java |
" | double quote | |
\ | backslash | |