Summary

This chapter provided a brief introduction to input and output streams and how they are used to write to and read from files.

The important points discussed are reviewed in this section.

I/O stands for program input and program output.

Program input refers to data flowing into a program and is handled by input streams from which the program can read.

Program output refers to data flowing out of a program and is handled by output streams to which the program can write.

In C# and .NET, streams and files can be abstracted into objects of classes that reside in the System.IO namespace. This makes it easier to perform file I/O.

Any file consists of one long sequence of bits positioned one after the other. Depending on their interpretation, ...

Get C# Primer Plus 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.