Summary 

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 HTTP calls over the internet. We then looked at a code implementation in which we made asynchronous I/O calls. Whenever possible, it's always beneficial to use asynchronous operations because it's better for the overall performance of the application. We went over code examples for executing asynchronous operations on both I/O and over the internet. 

In the next chapter, we will look at how LINQ queries can we used in C# to work efficiently when we are querying different data sources, such as XML and SQL. Working with code examples, we will explore the different components of LINQ, along with the different operators that we can use while working with LINQ queries.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.93.12