Review Questions

1:What is the main reason for using files?
2:How are streams represented in C# and .NET?
3:In what context have you already used streams in previous chapters?
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?
5:In what ways are text files and binary files similar? In what ways are they different?
6:Can you read a text file with a binary stream?
7:Suppose that you need to call just a single method only once in your program to manipulate a particular file in your file system. Which class would you use—File or FileInfo (given that the method exists in both classes)? Why?
8:Suppose that you need to call several methods one after the other ...

Get C# Primer Plus now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.