Skip to main content

Handling Exceptions

  • Chapter
  • 474 Accesses

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

eBook
USD   19.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   29.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints 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

Publish with us

Policies and ethics