StreamWriter Members
The following tables list the members exposed by the StreamWriter type.
Public Constructors
Name | Description | |
---|---|---|
StreamWriter | Initializes a new instance of the StreamWriter class for the specified file on the specified path, using the default encoding and buffer size. If the file exists, it can be either overwritten or appended to. If the file does not exist, this constructor creates a new file. |
Public Properties
Name | Description | |
---|---|---|
BaseStream | Gets the underlying stream that interfaces with a backing store. | |
CurrentEncoding | Gets the Encoding which this StreamWriter currently uses to write output. | |
Encoding | Gets the Encoding in which the output is written. |
Public Methods
Name | Description | |
---|---|---|
Close | Closes the current StreamWriter object and the underlying stream. | |
Dispose | Releases the unmanaged resources used by the StreamWriter and optionally releases the managed resources. | |
Flush | Clears all buffers for the current writer and causes any buffered data to be written to the underlying stream. | |
Write | Writes a character to the stream. | |
WriteLine | Writes a string followed by a line terminator to the text stream. |