Chapter 18. Files and Streams

Consciousness ... does not appear to itself chopped up in bits. ... A “river” or a “stream” are the metaphors by which it is most naturally described.

William James

I read part of it all the way through.

Samuel Goldwyn

I can only assume that a “Do Not File” document is filed in a “Do Not File” file.

Senator Frank Church Senate Intelligence Subcommittee Hearing, 1975

Objectives

In this chapter you will learn:

  • To create, read, write and update files.

  • The .NET framework streams class hierarchy.

  • To use classes File and Directory to obtain information about files and directories on your computer.

  • To become familiar with sequential-access file processing.

  • To use classes FileStream, StreamReader and StreamWriter ...

Get Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition 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.