C# Program to Print ASCII Value


Introduction

C# Program to Print ASCII Value. This program is compiled and tested on a Visual Studio 2012..


techstudy.org

HP 15 Core i3 7th gen Laptop(4GB, 1TB HDD, Windows 10) | Rs. 31,490

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
using System;

namespace TechStudyCSharp
{
    class Program
    {
        static void Main(string[] args)
        {
            char c;            
            Console.WriteLine("Enter a character: ");
            c = Convert.ToChar( Console.ReadLine());            
            Console.WriteLine("\nASCII Value of " +c+" "+  Convert.ToInt32(c));          
            Console.ReadKey();
        }
    }
}

Result

C# language techstudy

     





Related Topics




Popular Posts