complete-reference-vb_net_63
complete-reference-vb_net_63
Member Purpose
Encoding (p) Retrieves the encoding in which the output is written
FormatProvider (p) Retrieves an object that controls formatting
NewLine (p) Retrieves or changes the line terminator string used by the current
TextWriter
Close Closes the current StringWriter and the underlying stream
CreateObjRef Creates an object that contains all the relevant information required to
generate a proxy used to communicate with a remote object
Flush Clears all buffers for the current writer and causes any buffered data to be
written to the underlying device
GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy
for this instance
GetStringBuilder Returns the underlying StringBuilder object
Write Writes to this instance of the StringWriter
WriteLine Writes some data as specified by the overloaded parameters, followed by a
line terminator
Write
User the Write method to write data to an object that can receive a text input stream, such as StringBuilder.
The following code illustrates writing to a StringBuilder object:
Write does not force a new line, and new text is either appended to the existing text or, depending on the
object, overwrites it.
WriteLine
The WriteLine method works exactly like Write, but adds a line terminator to the end of the String, which
forces a new line. This is demonstrated as follows:
Console.WriteLine(sBuilder)
GetStringBuilder
The GetStringBuilder method will return an instance of StringBuilder that you can write to. Append and
insert your characters to the object as demonstrated in the earlier "Building Strings with StringBuilder"
section and then simply write the object to a line.
547