Special Character c #
C # Language specifications-2.4.4.4 characters
Author: unknown updated on:
A character represents a single character, usually composed of one character placed in quotation marks, such as 'A '.
Character-literal :( character :)
'Character' ('characters ')
Character :( character :)
Single-character (single character)
Simple-escape-sequence (simple escape sequence)
Hexadecimal-escape-sequence (hexadecimal escape sequence)
Unicode-escape-sequence (unicode escape sequence)
Single-character :( single character :)
Any character except '(U + 0027),/(U + 005C), and linefeed
Simple-escape-sequence: one of (simple escape sequence: one of the following)
/'/"// 0/a/B/f/n/r/t/v
Hexadecimal-escape-sequence :( hexadecimal escape sequence :)
/X hex-digit hex-digitopt (/x hexadecimal number optional)
The character followed by the backslash (/) must be one of the following: ', ",/, 0, a, B, f, n, r, t, u, U, x, v. Otherwise, a compilation error occurs.
The hexadecimal escape sequence represents a single Unicode character. Its value consists of "/x" followed by a hexadecimal number.
If the value of a character is greater than U + FFFF, a compile-time error occurs.
The Unicode Character escape sequence (Section 2.4.1) must be in the range of U + 0000 to U + FFFF.
A simple escape sequence represents a Unicode character encoding. See the following table.
Escape Sequence character name Unicode encoding
/'
Single quotes 0x0027
/"
Double quotation marks 0x0022
//
Backslash 0x005C
/0
Null 0x0000
/
Alert 0x0007
/B
Returns 0x0008
/F
Page feed 0x000C
/N
Linefeed 0x000A
/R
Enter 0x000D
/T
Horizontal tab 0x0009
/V
Vertical tab 0x000B
The "character" type is char.