Chapter 22

Answers to Chapter 22 Review Questions

1: What is the main reason for using files?
A1: Files provide permanent means for storing data.
2: How are streams represented in C# and .NET?
A2: With objects of stream classes found in the System.IO namespace.
3: In what context have you already used streams in previous chapters?
A3: Console.WriteLine and Console.ReadLine.
4: In which direction is the data moving when we talk about input—from the program to a destination device or from a destination device to the program?
A4: From a destination device to the program.
5: In what ways are text files and binary files similar? In what ways are they different?
A5: They both consist of bits and bytes. The bits and bytes in text files are encoded into a list ...

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.