Summary
Congratulations. After having read this and Chapter 6, “A Primer on Types and Objects,” you’re pretty much an expert in procedural programming techniques now, employing the whole reach of the C# statements spectrum. In this chapter, we discussed different parts of the exception-handling system, most notably focusing on how to write code that’s robust in the face of exceptions but also showing how to throw exceptions ourselves.
Next, we took a look at constructs that build on the exception-handling system, such as proper resource cleanup with the using statement and coordination of concurrent code using mutual exclusion provided by the lock statement.
In the next chapter, we continue to zoom out and look at classes, structs, and containers ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access