Question: I'm using c# for this my Goal is to be able to type on the keyboard and be able to display below the typed letter
I'm using c# for this my Goal is to be able to type on the keyboard and be able to display below the typed letter the date and time it was pressed.
The problem the time does not update when I click a key it only shows the time for when I first run the program. code will be down below 

program C# learning 1 Pusing System; I using System. Globalization; AWN 5 6 O references class program { 0 7 8 9 10 11 O references public static void Main() { ConsoleKeyInfo keyInfo; DateTime localdate = DateTime.Now; 12 -D do { 13 14 keyInfo = Console.ReadKey(true); + keyInfo.KeyChar); 15 16 17 18 19 20 Console.WriteLine("You entered: Console.WriteLine("at"); Console.WriteLine(localdate); } while (keyInfo.Key != ConsoleKey.Escape); 22 23 24 C:\Users halod source repos learning learning bin\Debug etcoreapp3.7\learning.exe You entered: g at 1/13/2021 4:32:13 PM Gyou entered: g at 1/13/2021 4:32:13 PM You entered: f at 1/13/2021 4:32:13 PM You entered: g at 1/13/2021 4:32:13 PM You entered: f at at 1/13/2021 4:32:13 PM You entered: a at 1/13/2021 4:32:13 PM
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
