Chapter 18Files Code Downloads for this Chapter

You can find the code downloads for this chapter at on the Download Code tab. The code is in the Chapter 18 download and program names match the names used in the examples throughout the chapter.

Files can be a great way to store data between instances of your application, or they can be used to transfer data between applications. User and application configuration settings can be stored to be retrieved the next time your application is run.

This chapter shows you how to use files effectively in your applications, touching on the major classes used to create, read from, and write to files, and the supporting classes used to manipulate the file system from C# code. Although you won't examine all of the classes in detail, this chapter goes into enough depth to give you a good idea of the concepts and fundamentals.

File Classes for Input and Output

Reading and writing files is an essential way to get data into your C# program (input) and send data out of your program (output). Because files are used for input and output, the file classes are contained in the System.IO namespace. ...

Get Beginning C# 6.0 Programming with Visual Studio 2015 now with O’Reilly online learning.

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