[Mono-bugs] [Bug 80176][Wis] New - Console.In.Read doesn't allow line-oriented input
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Dec 7 09:20:25 EST 2006
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 anto.cuni at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=80176
--- shadow/80176 2006-12-07 09:20:24.000000000 -0500
+++ shadow/80176.tmp.22224 2006-12-07 09:20:24.000000000 -0500
@@ -0,0 +1,37 @@
+Bug#: 80176
+Product: Mono: Class Libraries
+Version: 1.2
+OS:
+OS Details: same behaviour on linux-x86 and darwin-ppc
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: anto.cuni at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Console.In.Read doesn't allow line-oriented input
+
+Consider this code snippet:
+
+ public static void Main()
+ {
+ char[] buf = new char[16];
+ int n = Console.In.Read(buf, 0, 16);
+ Console.WriteLine("Hello {0}", new string(buf, 0, n));
+ }
+
+If you start typing the keys are not echoed back to the screen, and the
+program is blocked until you press 16 keystrokes. Then, only the last char
+typed is printed out to the screen.
+
+Mono 1.2.2.1 has this behaviour; mono 1.1.17 and Microsoft CLR it works as
+expected.
+
+I noticed that on the older version Console.In is of type
+System.IO.SynchronizedReader, while in the new one is of type
+System.CStreamReader.
More information about the mono-bugs
mailing list