c# - Is there a better alternative to Console.ReadKey()? -


Most programming books will ask you to use the console to stop the console. Reidki () to stop the console, but is there a better option?

  console. WrightLine ("Press any key to continue"); Console.ReadKey ();  

You have not actually told us what you want to achieve.

If you choose to continue the user you want to stop the output, then you actually wait for a key to be pressed using Console.ReadKey Are not. If you want to stop the output for a certain time, then you thread. Sleep can use the method, for which no human inventions are required.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -