5.4. System.IO

The System.IO namespace provides support for input and output. Support for file and directory manipulation is factored across four classes. A Directory and File pair of classes provide support for static members only. We use these classes when we do not have an actual directory or file. To manipulate an actual file or directory object, we use the DirectoryInfo and FileInfo pair of classes. These provide instance member functions to operate on a particular directory or file object. In addition, a Path utility class provides file and directory path string support.

Read and write support is separated into three general categories: the byte-oriented Stream class hierarchy (1), and specialized classes for handling character (2) or binary ...

Get C# Primer: A Practical Approach now with O’Reilly online learning.

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