TextWriter

TextWriter


Provides an interface used to write text characters to a stream.


Public:

Properties:

NameDescription
 Encoding (get) When implemented in a derived class, returns the Encoding in which the output is written.  
 FormatProvider (get) Gets an object that controls formatting.  
 NewLine (get) Gets the line terminator string used by the current TextWriter.  
 NewLine (let) Sets the line terminator string used by the current TextWriter.  

Methods:

NameDescription
 CloseWriter Closes this writer instance.  
 Equals Returns if the value is equal to this instance of TextWriter  
 Flush Forces any data being cached to be written to the stream immediately.  
 GetHashCode Returns a pseudo-unique number that identifies this object instance.  
 ToString Returns a string representation of this instance.  
 WriteChars Writes the string representation of the characters to the stream using both the format provider and encoding objects.  
 WriteLine Writes the string representation of the value followed by a NewLine to the stream using both the format provider and encoding objects.  
 WriteLineChars Writes the string representation of the characters followed by a NewLine to the stream using both the format provider and encoding objects.  
 WriteValue Writes the string representation of the value to the stream using both the format provider and encoding objects.  

Remarks

The specific writer will use the supplied or default Encoding scheme to convert text characters to byte arrays to be written to the stream.

See Also

Project CorLib Overview

Class TextWriter Overview

StreamWriter

StringWriter