c# how to get key input without block code example
Example: c# how to get key input without block
static void Main(string[] args)
{
while(true)
{
Console.WriteLine(DateTime.Now.ToString("HH:mm:ss"));
if(Console.KeyAvailable)
{
ConsoleKeyInfo key = Console.ReadKey();
Console.WriteLine("Read key: "+key.KeyChar);
}
Thread.Sleep(500);
}
}