Structured Exception Handling

Team-Fly    

 
Visual Basic .NET Unleashed
By Paul Kimmel
Table of Contents
Chapter 2.  Out with the Old, In with the New

Structured Exception Handling

Visual Basic .NET still supports On Error Goto error handling, but you should replace the old VB6 style On Error Goto statements with structured exception handling. (It's also likely that On Error Goto will be removed in future versions of VB; Microsoft is giving us a chance to get used to exceptions.)

Structured exceptions are one aspect of VB .NET that promote VB to a first-class language. Exceptions are subclassed from Objects and exception handling is more robust and precise than On Error Goto.

Exception handling was invented as a means of replacing the error-prone error code return value and supports writing more robust applications. Exception handling in VB .NET supports Try...Catch exception blocks and Try...Finally resource protection blocks. This topic requires more than a few paragraphs, so considerable coverage is provided in Chapter 3, "Basic Programming in VB .NET."


Team-Fly    
Top
 


Visual BasicR. NET Unleashed
Visual BasicR. NET Unleashed
ISBN: N/A
EAN: N/A
Year: 2001
Pages: 222

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net