Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition
by Paul J. Deitel - Deitel & Associates, Inc., Harvey M. Deitel - Deitel & Associates, Inc.
18.3. Files and Streams
Visual Basic views a file as a sequential stream of bytes (Fig. 18.2). Depending on the operating system, each file ends either with an end-of-file marker or at a specific byte number that is recorded in a system-maintained administrative data structure. For example, the Windows keeps track of the number of bytes in a file. When you open a file from a Visual Basic program, an object is created and a stream is associated with the object. When a program executes, the runtime environment creates three stream objects that are accessible via properties Console.Out, Console.In and Console.Error, respectively. These objects facilitate communication between a program and a particular file or device. Console.In refers to the
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access