Special characters : Escape sequences : Data Type C# Examples


C# Examples » Data Type » Escape sequences »

 

Special characters









    
using  System;
using  System.Collections.Generic;
using  System.Globalization;
using  System.IO;
using  System.Text;
using  System.Security.Cryptography;

public  class  MainClass
{
        public  static  void  Main()
        {
                Console.WriteLine("Single  quote  \\':  {0}  ({1})",  '\'',  (int)'\'');
                Console.WriteLine("Double  quote  \\\":  {0}  ({1})",  '\"',  (int)'\"');
                Console.WriteLine("Backslash  \\\\:  {0}  ({1})",  '\\',  (int)'\\');
                Console.WriteLine("Unicode  null  \\0:  {0}  ({1})",  '\0',  (int)'\0');
                Console.WriteLine("Alert  \\a:  {0}  ({1})",  '\a',  (int)'\a');
                Console.WriteLine("Backspace  \\b:  {0}  ({1})",  '\b',  (int)'\b');
                Console.WriteLine("Horizontal  tab  \\t:  {0}  ({1})",  '\t',  (int)'\t');
                Console.WriteLine("Newline  \\r:  {0}  ({1})",  '\r',  (int)'\r');
                Console.WriteLine("Vertical  quote  \\v:  {0}  ({1})",  '\v',  (int)'\v');
                Console.WriteLine("Form  feed  \\f:  {0}  ({1})",  '\f',  (int)'\f');
                Console.WriteLine("Carriage  return  \\r:  {0}  ({1})",  '\r',  (int)'\r');
        }

}
    
   
  
   



Output

Single quote \': ' (39)
Double quote \": " (34)
Backslash \\: \ (92)
Unicode null \0:   (0)
Alert \a:  (7)
Backspace \b: (8)
Horizontal tab \t:       (9)
 (13)ne \r:
Vertical quote \v:  (11)
Form feed \f:  (12)
 (13)age return \r:


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Escape sequences