lmarkov

ASCII Table

Nov 21st, 2012
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | None | 0 0
  1. using System;
  2. using System.Text;
  3.  
  4. class ASCII_Table
  5. {
  6.     static void Main()
  7.     {
  8.         Console.OutputEncoding = Encoding.Unicode;
  9.  
  10.         Console.WriteLine("ASCII table from 0 to 128");
  11.         for (int i = 0; i < 128; i++)
  12.         {
  13.             Console.WriteLine("{0}. {1}",i, (char)i); // ASCII Table
  14.         }
  15.  
  16.         Console.WriteLine("\n\nExtended ASCII table from 128 to 255");
  17.         for (int extend = 128; extend <= 255; extend++)
  18.         {
  19.             Console.WriteLine("{0}. {1}",extend, (char)extend);
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment