Skip to Main Content
VB.Net Web Developer's Guide
book

VB.Net Web Developer's Guide

by Syngress
September 2001
Intermediate to advanced content levelIntermediate to advanced
608 pages
23h 46m
English
Syngress
Content preview from VB.Net Web Developer's Guide
692 Chapter 14 • Upgrading Visual Basic Applications to .NET
Finally
<Cleanup Code>
'Contains cleanup code
End Try
Consider the following code fragment that demonstrates how to implement a
Try…Catch…Finally in a Visual Basic program.
Try
result = intVar1 / intVar2
Catch ex as System.OverflowException
Msgbox (ex.Message)
Finally
End Try
The statement that divides two integers is included in the Try block because
there might be a situation when the denominator could be zero.The Catch block
is defined with an object of the specific exception type.This is the exception we
expect the code to throw. Once the exception is caught, you can display a
custom error message ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

VB.NET Core Classes in a Nutshell

VB.NET Core Classes in a Nutshell

Budi Kurniawan, Ted Neward

Publisher Resources

ISBN: 9781928994480