Summary

In this chapter, you learned about the rich I/O capabilities offered through the System.IO namespace. Although file I/O operations are the most common kind, we focused on the generic functionality introduced by concepts such as streams, readers, and writers.

With regard to file system capabilities, we started by taking a look at the various Info classes that provide information about drives, directory hierarchies, and files. Leaving the macroscopic world of files as black boxes, we dove into various ways to read from and write to files. Such facilities span a wide gamma of techniques that balances ease of use with low-level control. For example, methods such as ReadToEnd are of incredible convenience, while BinaryReader-based I/O offers ...

Get C# 5.0 Unleashed 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.