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


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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.