[Solved] How to print the ASCII Table in C#?

  

3
Topic starter

I need to write a program which prints the entire ASCII table -  https://www.asciitable.com/  of characters at the console (characters from 0 to 255). I may need to use for-loops?

1 Answer
3

try this code mate:

using System;
 
class asciiTable
{
    static void Main()
    {
        Console.OutputEncoding = System.Text.Encoding.UTF8;
        for (int i = 0; i < 255; i++)
        {
            char symbol = (char)i;
            Console.WriteLine("{0} -> {1}", i, symbol);
        }
    }
}
Share: