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 ...

Get C# 4.0 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.