You can use Interop to call _kbhit. The version of kbhit without the underscore is actually depricated. Make sure you use STAThread to ensure everything is synchronized; both COM and Windows objects.
Code:
using System;
using System.Runtime.InteropServices;
public class Win32Interop
{
[DllImport("crtdll.dll")]
public static extern int _kbhit();
}
class KBHIT
{
[STAThread]
static void Main(string[] args)
{
System.Console.WriteLine( "Press any key: " );
while(!Win32Interop._kbhit());
}
}