Murach's Visual Basic 2005
How to work with files and data streams

Although databases are commonly used in Visual Basic applications, you may also need to access data that's stored in a text file or a binary file. So this chapter shows you how to read and write both types of files. It also shows you how to use one of the new My objects to work with files.

Chapter 22 How to work with files and data streams
An introduction to the System.IO classes 710
The classes for managing directories, files, and paths 710
How files and streams work 712
How to use the FileStream class 714
How to use the exception classes for file I/O 716
How to work with text files 718
How to write a text file 718
How to read a text file 720
A class that works with a text file 722
How to work with binary files 724
How to write a binary file 724
How to read a binary file 726
A class that works with a binary file 728
Two other ways to work with files 730
Use the My.Computer.FileSystem object 730
Use the Visual Basic functions 730




Murach's VB 2005

Learn more about this book

View the table of contents

Add this book to your cart



Our Ironclad Guarantee

First, try our books for 90 days. Then, if you aren't completely convinced that our books are the best ones you've ever used, you can return them for a full refund...no questions asked.