This posting is based on the famous threat: http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=413546 Well, asp.net team, is there a counterpart of kbhit() in c#/.net or not? I cannot believe, that the .net framework is without such function. (In a console
App)
This is not the best place to ask this. There is no need for kbhit() in the ASP.NET world, because ASP.NET is a server side technology. And in any event, this is not a C# issue as much as an issue of what the .NET framework provides (except for the Microsoft.VisualBasic
namespaces provided for backward compatibility for VB programmers) the languages use the framework provided classes. Perhaps Console.Read() would suffice...
int i; char c; while (true) { i = Console.Read (); if (i == -1) break; c = (char) i; Console.WriteLine ("Echo: {0}", c); } Console.WriteLine ("Done"); return 0;
Member
15 Points
160 Posts
Part 2 of "is there a kbhit() in .net?"
Dec 10, 2003 06:02 AM|cantfindbettername|LINK
Member
151 Points
4631 Posts
Re: Part 2 of "is there a kbhit() in .net?"
Dec 11, 2003 07:34 AM|douglas.reilly|LINK
int i; char c; while (true) { i = Console.Read (); if (i == -1) break; c = (char) i; Console.WriteLine ("Echo: {0}", c); } Console.WriteLine ("Done"); return 0;
Programming Microsoft Web Forms
My Blog