Escape Sequence

Character combinations consisting of a backslash (\) followed by a letter or by a combination of digits are called Escape Sequences. To represent a newline character, single quotation mark, or certain other characters in a character constant, you must use escape sequences.


Escape Sequence Represents
\n New line
\t Horizontal tab
\v Vertical tab
\' Single quotation mark
\" Double quotation mark
\\ Backslash
\? Literal question mark
\b Backspace

CODE

static void Main(string[] args) {
    Console.WriteLine("Coders\nCapsule");
    /*Output :
      Coders
      Capsule*/

    Console.WriteLine("Coders\tCapsule"); //Output : Coders Capsule
    Console.WriteLine("Coders\bCapsule"); //Output : CoderCapsule
    Console.WriteLine("C:\\Program Files\\Adobe"); //Output : C:\Program Files\Adobe
}