O'Reilly logo

Microsoft® .NET Compact Framework (Core Reference) by Mark Sutton, Rory MacLoed, Robert Burbidge, Stephen Wheelwright, Andy Wigley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the StreamReader and StreamWriter Classes

The StreamReader and StreamWriter classes derive from the TextReader and TextWriter abstract classes. These classes perform input and output of characters with a stream using a particular encoding to translate the characters into bytes and bytes into characters so that the underlying stream can be read from or written to. These classes offer a simpler, higher level interface than the underlying Stream object, and they can read or write strings.

Creating StreamReader and StreamWriter Objects

The constructors for the StreamReader and StreamWriter classes allow you to create your own Stream object and create a StreamReader or StreamWriter class by passing the stream as a parameter. Both classes also allow ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required