dotnet / dotnet/dotnet-api-docs
System.IO.StreamWriter Constructor with BufferSize Argument
- Lingua principale
- C#
- Stelle
- 949
- Fork
- 1.7k
- Merge medio
- 3g 27m
- PR unite (30g)
- 49
Descrizione
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_)
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.