Appendix B. Exception Handling in C#

The topics discussed here extend the discussion of exception handling found in Chapter 8, so this discussion assumes that you have first thoroughly reviewed Chapter 8. The purpose of this appendix is to review Microsoft's recommendations for exception management and present a few of the exception classes provided by the .NET Framework.

Managing Exceptions

Exceptions are generated when the implicit assumptions made by your programming logic are violated. For example, when a program attempts to connect to a database, it assumes that the database server is up and running on the network. If the server can't be located, an exception is generated. It's important that your application gracefully handles any exceptions ...

Get Beginning C# Object-Oriented Programming 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.