In this chapter, we learned how to execute I/O operations related to files and networks in C#. We went over namespaces that provide helper classes for executing I/O operations. We started with the basic operations that we can perform on drives and directories. We looked at code that we can use to loop through files in directories.
Then we looked at the helper classes that help us with I/O operations on files. We looked at the File and FileInfo classes, which help us create, copy, move, and delete files. We looked at best practices for dealing with directory and file paths. We then looked at streams, or sequences of bytes, which allow us to edit information present in files. We then looked at best practices for exception handling in files.
After that, we looked at helper classes for dealing with I/O operations over networks. We looked at a code example in which we made...