9

File Input and Output

Files stored on disk drives allow our programs to persist data across executions, enabling us to develop potent tools to help us get our daily work done. In addition, we can treat files as both text and binary data. We will explore the advantages of using both methods. We will also think about organizing the files we use in our programs in directories.

In this chapter, we’re going to cover the following main topics:

  • Working with directories and files
  • Writing text to files
  • Writing binary data to files
  • Reading text from files
  • Reading binary data from files

Working with directories and files

We will utilize two different methods for VB.NET and older VB family members. We will see this pattern throughout this chapter as ...

Get Visual Basic Quickstart Guide 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.