You will learn about the following in this chapter:
Input streams and output streams
Text files and character streams
Binary files and binary streams
Four classes from the System.IO namespace that are commonly used to handle files and streams
How to represent a file in your program with the FileInfo class
The character stream classes StreamWriter and StreamReader
The binary stream class FileStream
I/O is short for program input and program output. Program input refers to data (numbers, characters, and bytes) flowing into a program from a source (keyboard, file, remote computer, or something similar). Program output refers to data flowing out from a program to a destination (screen, file, remote computer, or something similar).
This chapter provides a brief presentation of important file I/O concepts and introduces you to a few selected classes located in the .NET Framework that are commonly used to perform file I/O in C#.