Description | |
|
A StreamWriter object allows character data to be written to a stream using either default or specified encoding.
The target may be a stream, a file or just a path that supports streaming. Optionally, the buffer size may be specified. |
|
Syntax | |
| Constructor Create ( | FileOrPath : String
; ); | Constructor Create ( | FileOrPath : String; Append : Boolean
); | Constructor Create ( | FileOrPath : String; Append : Boolean; DataEncoding : System.Text.Encoding
); | Constructor Create ( | FileOrPath : String; Append : Boolean; DataEncoding : System.Text.Encoding; BufferSize : Integer
); | Constructor Create ( | TargetStream : Stream
; ); | Constructor Create ( | TargetStream : Stream; DataEncoding : System.Text.Encoding
); | Constructor Create ( | TargetStream : Stream; DataEncoding : System.Text.Encoding; BufferSize : Integer ); |
|
Methods | |
| | Close | Closes the StreamWriter | | Write | Writes data to the current stream |
|
|
|
Fields | |
| Null | | | | Provides a StreamWriter with no backing store that can be written to, but not read from. |
|
Properties | |
| AutoFlush | | Boolean | | Gets or sets a value indicating whether the StreamWriter will flush its buffer to the underlying stream after every call to StreamWriter.Write.
| BaseStream | | Stream | | Gets the underlying stream that interfaces with a backing store.
| Encoding | | System.Text.Encoding | | Overridden. Gets the Encoding in which the output is written.
| FormatProvider | | IFormatProvider | | Gets an object that controls formatting.
| NewLine | | String | | Gets or sets the line terminator string used by the current TextWriter. |
|
Microsoft MSDN links | |
|
|