Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDick Porter <dick@acm.org>2004-08-18 17:53:30 +0400
committerDick Porter <dick@acm.org>2004-08-18 17:53:30 +0400
commit3f4364ce9fbe066fada2c0e337e7c90c73838fe2 (patch)
treef165e161fec579c1fc224fcf860d09a58929ae76 /mcs/class/corlib/System.IO/StreamWriter.cs
parente04f0dc9e030f7b8cd54e1e60eeebc034c98350d (diff)
2004-08-18 Dick Porter <dick@ximian.com>
* StreamWriter.cs: Flush the buffer if AutoFlush is set to true. Fixes bug 63063, patch by Laurent Debacker (debackerl@yahoo.com). svn path=/trunk/mcs/; revision=32486
Diffstat (limited to 'mcs/class/corlib/System.IO/StreamWriter.cs')
-rw-r--r--mcs/class/corlib/System.IO/StreamWriter.cs16
1 files changed, 10 insertions, 6 deletions
diff --git a/mcs/class/corlib/System.IO/StreamWriter.cs b/mcs/class/corlib/System.IO/StreamWriter.cs
index 117ab7f5d60..96ac1380984 100644
--- a/mcs/class/corlib/System.IO/StreamWriter.cs
+++ b/mcs/class/corlib/System.IO/StreamWriter.cs
@@ -137,12 +137,16 @@ namespace System.IO {
get {
return iflush;
}
- set {
- if (DisposedAlready)
- throw new ObjectDisposedException("StreamWriter");
- iflush = value;
- }
- }
+ set {
+ if (DisposedAlready)
+ throw new ObjectDisposedException("StreamWriter");
+ iflush = value;
+
+ if (iflush) {
+ Flush ();
+ }
+ }
+ }
public virtual Stream BaseStream {
get {