StringWriter and StringReader
StringWriter Class Implements a TextWriter for writing information to a string and the information is stored in an underlying StringBuilder Class. StringBuilder Class Represents a mutable string of characters and this class cannot be inherited.
WriteLine(String) method writes a string followed by a line terminator to the text stream.
StringReader Class Implements a TextReader that reads from a string. StringReader.ReadLine Method Reads a line from the underlying string.
The next line from the underlying string, or Nothing if the end of the underlying string is reached.
The following program shows how to use StringWriter and StringReader Classes in VB.NET.