Following the recommendation of Gleen. By the way let me recommend you a
good e-book when it comes to C#, which can be a good start for any
one, Illustrated C# 2008 by Daniel Solis, on which C# presented clearly,
concisely, and visually published by Apress.
This following is from CHAPTER 8 EXPRESSIONS AND OPERATORS page 198
Character Literals
A character literal consists of a character representation between two
single quote marks. A character representation can be any of the following:
a single character, a simple escape sequence, a hex escape sequence, or a
Unicode escape sequence.
- The type of a character literal is char.
- A simple escape sequence is a backslash followed by a single character.
- A hex escape sequence is a backslash, followed by an upper or lowercase
x, followed by up to four hex digits.
- A Unicode escape sequence is a backslash, followed by an upper or
lowercase u, followed by up to four hex digits.
For example, the following code shows various formats of character literals:
Some of the important special characters and their encodings are shown below
char c1 = 'd'; // Single character
char c2 = '\n'; // Simple escape sequence
char c3 = '\x0061'; // Hex escape sequence
char c4 = '\u005a'; // Unicode escape sequence
Name Escape Sequence Hex
Encoding
Null \0
0x0000
Alert \a
0x0007
Backspace \b
0x0008
Horizontal tab \t
0x0009
New line \n
0x000A
Vertical tab \b
0x000B
Form feed \f
0x000C
Carriage return \r
0x000D
Double quote \"
0x0022
Single quote \'
0x0027
Backslash \\
0x005C
<Red>
On Thu, Nov 6, 2008 at 3:48 PM, Glenn <[EMAIL PROTECTED]> wrote:
> Like everyone else, we all learned .NET from tutorials and books. Every
> one of them showed the use of Newline when outputting multiple lines of
> text.
>
> ...Glenn
>
> On Thu, Nov 6, 2008 at 7:35 AM, santhosh vs <[EMAIL PROTECTED]> wrote:
>
>> ya, but many books doesn't tell the fact. They does n't even tell about
>> the newline . A reader only came to know about it through the sample
>> programs
>>
>