Class StreamWriterOptions
Specifies options that is related to System.IO.StreamWriter operations. This class cannot be inherited.
Inheritance
Namespace: Cuemon.IO
Assembly: Cuemon.IO.dll
Syntax
public sealed class StreamWriterOptions
Constructors
| Improve this DocStreamWriterOptions()
Initializes a new instance of the StreamWriterOptions class.
Declaration
public StreamWriterOptions()
Remarks
The following table shows the initial property values for an instance of StreamWriterOptions.
Property | Initial Value |
---|---|
AutoFlush | false |
BufferSize | 1024 |
Encoding | System.Text.Encoding.UTF8 |
FormatProvider | System.Globalization.CultureInfo.InvariantCulture |
NewLine | \r\n |
Properties
| Improve this DocAutoFlush
Gets or sets a value indicating whether the System.IO.StreamWriter will flush its buffer to the underlying stream after every call to the Write
method.
Declaration
public bool AutoFlush { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
BufferSize
Gets or sets the size of the buffer.
Declaration
public int BufferSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The size of the buffer in bytes for the System.IO.StreamWriter. |
Encoding
Gets or sets the Encoding in which the output is written by the System.IO.StreamWriter.
Declaration
public Encoding Encoding { get; set; }
Property Value
Type | Description |
---|---|
System.Text.Encoding | The Encoding for the System.IO.StreamWriter. |
FormatProvider
Gets or sets the culture-specific formatting information used when writing data with the System.IO.StreamWriter.
Declaration
public IFormatProvider FormatProvider { get; set; }
Property Value
Type | Description |
---|---|
System.IFormatProvider | An System.IFormatProvider that contains the culture-specific formatting information. The default is System.Globalization.CultureInfo.InvariantCulture. |
NewLine
Gets or sets the line terminator string used by the System.IO.StreamWriter.
Declaration
public string NewLine { get; set; }
Property Value
Type | Description |
---|---|
System.String | The line terminator string for the System.IO.StreamWriter. |