Skip to content

Commit a673533

Browse files
authored
Document that StreamWriter.Dispose flushes
This is an important detail. It tells you that `Dispose` is a blocking call. It also tells you that it can throw I/O exceptions. And of course that you don't have to call `Flush` or `FlushAsync` yourself first.
1 parent 8238dc0 commit a673533

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xml/System.IO/StreamWriter.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@
946946
<Docs>
947947
<param name="disposing">
948948
<see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param>
949-
<summary>Releases the unmanaged resources used by the <see cref="T:System.IO.StreamWriter" /> and optionally releases the managed resources.</summary>
949+
<summary>Causes any buffered data to be written to the underlying stream, releases the unmanaged resources used by the <see cref="T:System.IO.StreamWriter" />, and optionally the managed resources.</summary>
950950
<remarks>
951951
<format type="text/markdown"><![CDATA[
952952
@@ -2175,4 +2175,4 @@ For a list of common I/O tasks, see [Common I/O Tasks](~/docs/standard/io/common
21752175
</Docs>
21762176
</Member>
21772177
</Members>
2178-
</Type>
2178+
</Type>

0 commit comments

Comments
 (0)