O'Reilly logo

Visual C#® 2012: How to Program, Fifth Edition by Harvey Deitel, Paul Deitel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

17.3. Files and Streams

C# views each file as a sequential stream of bytes (Fig. 17.2). Each file ends either with an end-of-file marker or at a specific byte number that’s recorded in a system-maintained administrative data structure. When a file is opened, an object is created and a stream is associated with the object. When a console app executes, the runtime environment creates three stream objects that are accessible via properties Console.Out, Console.In and Console.Error, respectively. These objects use streams to facilitate communication between a program and a particular file or device. Console.In refers to the standard input stream object, which enables a program to input data from the keyboard. Console.Out refers to the standard output ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required