[Mono-list] Console Read
ian.norton-badrul at thales-esecurity.com
Wed Jun 6 06:31:38 UTC 2012
On 28/05/2012 06:33, vh-bil wrote:
> I am having trouble with Console.Read and ReadLine etc. where the keys
> pressed are being output to the console without the program writing it. Is
> there an option to say the keys have been handled so they are not written to
> the console while typed?
> using System;
> namespace test
> class MainClass
> public static void Main (string args)
> string s = Console.ReadLine();
> Console.WriteLine (s + " was the text");
> is outputting: (as you can see TEST is written to the console while typed)
> TEST was the text
> Press any key to continue...
doing console.ReadKey(true) will not echo the character to the console.
You could do this in a loop until you get all your input or get an
More information about the Mono-list