In this chapter, you learned why exceptions are important and how to deal with them, both from a consumer and producer perspective. You saw how to catch exceptions with the try statement and learned about its associated catch and finally blocks. This chapter also covered several best practices related to when and why (or why not) to catch exceptions. With regard to producing exceptions, we discussed creating our own exception types.

We also covered some of the most essential and most used exception types that appear in the .NET Framework’s BCL.

Get C# 5.0 Unleashed now with O’Reilly online learning.

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