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 to read text from and write text to files.

  • To use classes FileStream and BinaryFormatter to read objects from and write objects to files.

Outline

18.1 Introduction

18.2 Data Hierarchy

18.3 Files and Streams

18.4 Classes File and Directory

18.5 Creating a Sequential-Access Text File

18.6 Reading Data from a Sequential-Access Text File

18.7 Case Study: A Credit-Inquiry Program

18.8 Serialization

18.9 Creating a Sequential-Access File Using Object Serialization

18.10 Reading and Deserializing Data from a Sequential-Access Text File

18.11 Wrap-Up



Visual BasicR 2005 for Programmers. DeitelR Developer Series
Visual Basic 2005 for Programmers (2nd Edition)
ISBN: 013225140X
EAN: 2147483647
Year: 2004
Pages: 435

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net