This program is compiled and tested on a Visual Studio 2012..
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();
}
}
}
This program is compiled and tested on a Visual Studio 2012..
Result:
Enter a character:
a
ASCII Value of a 97
need an explanation for this answer? contact us directly to get an explanation for this answer