Sometimes people want a way to use a kbhit() like function in C# at the Console.
while( true )
{
if( Console.KeyAvailable ) // since .NET 2.0
{
char c = Console.ReadKey().KeyChar ;
Console.Write( c );
}
}
Sometimes people want a way to use a kbhit() like function in C# at the Console.
while( true )
{
if( Console.KeyAvailable ) // since .NET 2.0
{
char c = Console.ReadKey().KeyChar ;
Console.Write( c );
}
}