Chapter 22. FILE I/O BASICS

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). ...

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.