Lecture overview -- Keyboard shortcut: 'u'  Previous page: Members in class BinaryReader  -- Keyboard shortcut: 'p'  Next page: The Console class -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Alphabetic index  Help page about these notes  Course home    Input and Output Classes - slide 22 : 40

The classes StringReader and StringWriter

StringReader and StringWriter allow strings to be read and written like streams

A StringWriter is constructed on a StringBuilder object

A StringReader is constructed on a string object

Input Output
Text TextReader
    StreamReader
    StringReader
TextWriter
    StreamWriter
    StringWriter
Binary BinaryReader BinaryWriter
write-prog.cs
A StringWriter program similar to the StreamReader program shown earlier.
write-output
Output of the StringWriter program.
read-prog.cs
A StringReader program.
read-output
Output of the StringReader program.