StreamWriter Members

The following tables list the members exposed by the StreamWriter type.

Public Constructors

Name Description
Public Method StreamWriter Instantiates a new instance of the StreamWriter class for the specified stream, using UTF-8 encoding and the default buffer size.

Public Fields

Name Description
Public Field Static Null Specifies a null stream.

Public Properties

Name Description
Public Property AutoFlush Gets or sets a value controlling whether the StreamWriter flushes its buffer to the underlying stream after every call to the Write method.
Public Property BaseStream Gets the underlying stream that interfaces with the data storage.
Public Property Encoding Gets the encoding in which the output is written.

Public Methods

Name Description
Public Method Close Closes the current StreamWriter object and the underlying stream.
Public Method Flush Clears all buffers for the StreamWriter object, causing any buffered data to be written to the underlying stream.
Public Method Write Overloaded. Writes data to the stream.

Protected Methods

Name Description
Protected Method Dispose Releases the unmanaged resources used by the StreamWriter object and optionally releases its managed resources.

See Also

Reference

StreamWriter Class
System.Ext.IO Namespace