← Interactive API Explorer
Namespace: System.IO

StreamWriter

Implements a TextWriter for writing characters to a stream in a particular encoding.

Properties (1)

Stream BaseStream
Gets the underlying stream that interfaces with a backing store.
Value: The stream this StreamWriter is writing to.

Methods (2)

StreamWriter(IO.Stream,Text.Encoding)Constructor
Initializes a new instance of the StreamWriter class for the specified stream by using the specified encoding and the default buffer size.
ParameterDescription
streamThe stream to write to.
encodingThe character encoding to use.
StreamWriter(IO.Stream)Constructor
Initializes a new instance of the StreamWriter class for the specified stream by using UTF-8 encoding and the default buffer size.
ParameterDescription
streamThe stream to write to.