dotnet / dotnet/dotnet-api-docs
System.IO.StreamWriter Constructor with BufferSize Argument
- Vorherrschende Sprache
- C#
- Sterne
- 949
- Forks
- 1.7k
- Ø Merge
- 3 T. 27 Min.
- Gemergte PRs (30 T.)
- 49
Beschreibung
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)](https://docs.microsoft.com/en-us/dotnet/api/system.io.streamwriter.-ctor?view=netframework-4.8#System_IO_StreamWriter__ctor_System_IO_Stream_System_Text_Encoding_System_Int32_)
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.