Write C# program to print ASCII values of all characters

Introduction

I have used Visual Studio 2012 for debugging purpose. But you can use any version of visul studio as per your availability..

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
public class csharpExercise
{
    static void Main(string[] args)
    {
 
        int i;
 
        // Printing ASCII values from 0 to 255
        for (i = 0; i <= 255; i++)
        {
            Console.WriteLine("ASCII value of " + i +" = " + i);
        }
        Console.ReadLine();
    }
}

Result

Write C# program to print ASCII values of all characters
Write C# program to print ASCII values of all characters

Leave a Comment

x