RE: Any Key

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Shamefoot (Shamefoot_at_discussions.microsoft.com)
Date: 10/09/04


Date: Sat, 9 Oct 2004 13:11:02 -0700

Thank You sir Much aprreciated

"ValyaS" wrote:

> Use the Console.Read() function. Here is a MS example:
>
> 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;
>
>
>
>
> "Shamefoot" wrote:
>
> > I need a console based application to pause until the user is ready to
> > proceed. I would prefer to do some thing like
> > console.writeline("Press any key to continue . . . . ")
> > //some how make it wait for any char to be pressed ie getch() in C
> >
> > thanks



Relevant Pages