Hour 10. Handling Errors Using Exceptions

As an application executes, it can encounter any number of possible error conditions. C# handles these error conditions using exceptions, which encapsulate the information about an error in a single class. Exceptions are intended to be used only for failure reporting, so they provide a consistent way to report and respond to those failures. Exceptions are not intended to provide a mechanism to control program flow, reporting success conditions, or as a feedback mechanism. They are for reporting failures ...

Get Sams Teach Yourself Visual C#® 2010 in 24 Hours 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.