Module Module1
Sub Main()
Dim intItem1 As Integer = 0
Dim intItem2 As Integer = 128
Dim intResult As Integer
Try
intResult = intItem2 / intItem1
Console.WriteLine("The answer is ", intResult)
Console.WriteLine("Press Enter to continue...")
Console.ReadLine()
Catch
Console.WriteLine("An overflow exception occurred.")
End Try
End Sub
End Module
|