4.1. System.IO namespace – streams and file system access

This namespace contains classes and other types used to work (synchronous and asynchronous reading and writing) with data streams and files. The System.IO namespace consists of classes that implement streams, streams readers, and writers, as well as classes used to work with the file system. Figure 4.1 shows most of the classes in the System.IO namespace.

Figure 4.1. The main classes in the System.IO namespace

Streams

The Stream class is an abstract view of a sequence of bytes. Derived classes provide more specific functionality – working with files (FileStream class), memory (MemoryStream ...

Get A Programmer's Guide to .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.