[Mono-bugs] [Bug 24586] New - StreamWriter doesn't wait for Flush
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
12 May 2002 13:52:17 -0000
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 ndrochak@gol.com.
http://bugzilla.ximian.com/show_bug.cgi?id=24586
--- shadow/24586 Sun May 12 09:52:17 2002
+++ shadow/24586.tmp.25561 Sun May 12 09:52:17 2002
@@ -0,0 +1,39 @@
+Bug#: 24586
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details: RedHat 7.2
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: ndrochak@gol.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: StreamWriter doesn't wait for Flush
+
+The following code should output a 0 (zero), but it outputs a 4.
+
+The underlying Stream is not waiting for the Flush it seems.
+
+----cut here-------------------------------------
+using System;
+using System.IO;
+
+namespace NS {
+ class C {
+ public static int Main() {
+ MemoryStream m = new MemoryStream();
+ StreamWriter w = new StreamWriter(m);
+ w.Write(1);
+ w.Write(2);
+ w.Write(3);
+ w.Write(4);
+ return (int)m.Length;
+ }
+ }
+}