O'Reilly logo

C# Primer Plus by Klaus Michelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

This chapter introduced exceptions, what they are, and how to handle them. The important points discussed in this chapter are as follows.

An exception represents an abnormal condition in your program.

An exception is an object of the class System.Exception or of a subclass derived thereof. The .NET Framework contains several intrinsic exception classes derived from System.Exception.

An exception object can either be implicitly created and thrown by the runtime, or explicitly created and thrown by applying the throw keyword in your source code.

An uncaught exception causes a program to stop abruptly and display (to many) an obscure message on the console.

Three different but closely related language elements are used to deal with exceptions: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required