dotnet-api-docs
dotnet-api-docs copied to clipboard
System.IO.StreamWriter Constructor with BufferSize Argument
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)