Chapter 18 Unsafe code
A character that follows a backslash character (\) in a character must be one of the following characters: ', ", \, 0, a, b, f, n, r, t, u, U, x, v. Otherwise, a compile-time error occurs.
A hexadecimal escape sequence represents a single Unicode character, with the value formed by the hexadecimal number following “\x”.
If the value represented by a character literal is greater than U+FFFF, a compile-time error occurs.
A Unicode character escape sequence (§2.4.1) in a character literal must be in the range U+0000 to U+FFFF.
A simple escape sequence represents a Unicode character encoding, as described in the table below.
The type of a character-literal is char.
220.127.116.11 String literals
C# supports two forms of string literals: regular string literals and verbatim string literals.
A regular string literal consists of zero or more characters enclosed in double quotes, as in "hello", and may include both simple escape sequences (such as \t for the tab character), and hexadecimal and Unicode escape sequences.
A verbatim string literal consists of an @ character followed by a double-quote character, zero or more characters, and a closing double-quote character. A simple example is @"hello". In a verbatim string literal, the characters between the delimiters are interpreted verbatim, the only exception being a quote-escape-sequence. In particular, simple escape sequences, and hexadecimal and Unicode escape sequences are not processed in verbatim string literals. A verbatim string literal may span multiple lines.
string-literal: regular-string-literal verbatim-string-literal
regular-string-literal: " regular-string-literal-charactersopt "
Copyright Microsoft Corporation 1999-2003. All Rights Reserved.43