Summary
Exceptions do happen in programs. Sometimes you’ll even expect one to happen, and at other times you’ll need to code for the worse, just in case something goes wrong.
C#’s try... catch... finally block lets you catch and work with the exceptions, bubbling them up to other code if necessary.
This pretty much concludes our tour of the major language features of C#. There are still nuances to learn, but they are out of the scope of a beginner’s book. You’re sure to pick them up as you work through the rest of the book, building real Windows applications, and as you start to work on your own programs.
So without further ado, let’s dive into the rest of the treats Visual C# 2005 Express has to offer so you can start to learn how to really use the tool to write great applications.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2006 Peter Wright
About this chapter
Cite this chapter
(2006). Handling Exceptions. In: Beginning Visual C# 2005 Express Edition. Apress. https://doi.org/10.1007/978-1-4302-0167-0_6
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0167-0_6
Publisher Name: Apress
Print ISBN: 978-1-59059-549-7
Online ISBN: 978-1-4302-0167-0
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)