What not use:
if( Console.In.Peek()>0 ) { .... read some chars... if comlete commend goto
execute ...} else { do something else }
Doc says: "The current position of the TextReader is not changed by this
operation. The returned value is -1 if no more characters are available. The
default implementation returns -1."
Pazu
"Frank Eller" <fe[NOSPAM]@frankeller.de> píąe v diskusním příspěvku
news:uD**************@TK2MSFTNGP10.phx.gbl...
Hi Frank,
in a consoleapp I have a continious loop doing stuff.
Additionally I want during the loop type in characters and when the
combined chars form a word (ic 'test') I want to execute a method.
What could I use? Not Console.Read because it blocks the main loop. I
would need a asynchronous read of some kind. Anyone have a simple
solution? Thanks
IMHO no simple solution, no. I believe you need to get familiar with
Threads ... the System.Threading namespace is a good starting point.
Regards,
--
Frank Eller
www.frankeller.de