Constructs and initializes a new instance of the System.IO.StreamWriter class for the specified stream, using the specified encoding and buffer size.
- stream
- The System.IO.Stream to write to.
- encoding
- A System.Text.Encoding that specifies the character encoding to use.
- bufferSize
- A int that specifies the buffer size.
Type Reason ArgumentNullException stream or encoding is null. ArgumentOutOfRangeException bufferSize is negative. ArgumentException stream does not support writing.
This constructor initializes the StreamWriter.Encoding property using encoding , and the StreamWriter.BaseStream property using stream . For additional information, see TextWriter.Encoding.
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0