First read the character as Console.Read() function. This will return you the character. Then cast the character to int. You will get ascii value of that character. You can also use ReadKey method. I have shown both examples below.
public static void Main(string[] args)
{
//First Method
int character1 = Console.Read();
Console.WriteLine(character1);
//Second Method
int character2 = Console.ReadKey().KeyChar;
Console.WriteLine(character2);
Console.ReadLine();
}
I hope this helps.
Please mark this post as answer if it solved your problem. Happy Programming!