Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

C#, kbhit & getch


  • Please log in to reply
3 replies to this topic

#1 BobLewiston

BobLewiston

  • Members
  • 69 posts
  • OFFLINE
  •  
  • Local time:12:07 AM

Posted 08 January 2009 - 08:03 PM

In C#, what methods take the place of the old kbhit and getch functions in C? (I'm writing a console application in Visual Studio.)

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:10:07 PM

Posted 08 January 2009 - 08:18 PM

getch = cin

This may help:
http://www.cplusplus.com/doc/tutorial/basic_io.html

#3 BobLewiston

BobLewiston
  • Topic Starter

  • Members
  • 69 posts
  • OFFLINE
  •  
  • Local time:12:07 AM

Posted 08 January 2009 - 09:02 PM

attention, Groovicus -

I notice you've directed me to a C++ site. Will the information there also pertain to C#?

#4 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:10:07 PM

Posted 08 January 2009 - 09:19 PM

My bad. No, that wasn't at all the correct answer. You likely want Console.Read(), and I can't find a good tutorial at the moment.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users