Wednesday, December 9, 2009

Escape Sequences

While Coding we use many special characters, and we have seen some characters which start with a backslash ("\"). All the characters which starts from backslash ("\") is known as the escape sequence. There are several escape sequence are used in the c# here are the list of that. you can use them according to the use..

\a Bell (alert)
\b Backspace
\f Formfeed
\n New line
\r Carriage return
\t Horizontal tab
\v Vertical tab
\' Single quotation mark
\" Double quotation mark
\\ Backslash
\? Literal question mark
\ooo ASCII character in octal notation
\xhh ASCII character in hexadecimal notation
\xhhhh Unicode character in hexadecimal notation if this escape sequence is used in a wide-character constant or a Unicode string literal.

Hope the information was useful.. Happy coding!!!!

Anil Kumar Pandey
System Architect, MVP
Mumbai, Maharshtra