[Mono-bugs] [Bug 81159][Nor] Changed - Console.In.Read doesn't allow line-oriented input with mscorlib 2.0

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Apr 18 12:01:40 EDT 2007

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by fejj at novell.com.


--- shadow/81159	2007-04-18 11:44:08.000000000 -0400
+++ shadow/81159.tmp.22046	2007-04-18 12:01:40.000000000 -0400
@@ -55,6 +55,27 @@
 the '\n'? And if it reads the full 16 characters, does it need to wait
 for another Enter?
 Also, what if I type, say, 20 characters before hitting Enter. What
 happens with those other 4 characters? are they dropped? or do they
 become the first 4 characters read by the next call to Console.In.Read()?
+------- Additional Comments From fejj at novell.com  2007-04-18 12:01 -------
+ok, so the msdn docs say:
+This method returns after either count characters are read or the end
+of the file is reached.
+which suggests the current implementation is correct, however, one of
+the other Mono devs volunteered to test this case for me and it would
+appear that this is not how MS's corelib behaves :(
+<shana> well, msnet 2.0 echoes back the chars and discards whatever
+goes past 16
+<shana> if you hit enter, it interrupts the read and displays only
+those that you wrote before the enter
+<shana> it always needs the enter
+<shana> let me test one more thing
+<shana> if you do read twice, and on the first time you enter more
+than 16 characters, on the second read it will read the extra
+characters plus the enter

More information about the mono-bugs mailing list