dotnet-api-docs icon indicating copy to clipboard operation
dotnet-api-docs copied to clipboard

System.IO.StreamWriter Constructor with BufferSize Argument

Open akalnay opened this issue 5 years ago • 2 comments

The documentation for public StreamWriter (System.IO.Stream stream, System.Text.Encoding encoding, int bufferSize) states that an ArgumentOutOfRangeException will be thrown if bufferSize is negative. That statement is incorrect as it implies that a value of zero will not throw an exception. The corresponding documentation for public StreamReader (System.IO.Stream stream, System.Text.Encoding encoding, bool detectEncodingFromByteOrderMarks, int bufferSize) is correct as it states that an ArgumentOutOfRangeException will be thrown if bufferSize is less than or equal to zero.

public StreamWriter (System.IO.Stream stream, System.Text.Encoding encoding, int bufferSize)

akalnay avatar Sep 12 '20 13:09 akalnay