Finally after multiple catch statements : Finally « Development « VB.Net Tutorial






Module Module1
    Sub Main()
        Dim intItem1 As Integer = 0
        Dim intItem2 As Integer = 128
        Dim intResult As Integer
        Try
            intResult = intItem2 / intItem1
        Catch e As OverflowException
            Console.WriteLine("An overflow exception occurred.")
        Catch e As OutOfMemoryException
            Console.WriteLine("Out of memory.")
        Catch e As IndexOutOfRangeException
            Console.WriteLine("Array index out of range.")
        Finally
            Console.WriteLine("Finally")

        End Try
    End Sub
End Module
An overflow exception occurred.
Finally








7.7.Finally
7.7.1.Try Catch with Finally clause
7.7.2.Finally always executes
7.7.3.Close Stream in Finally statement
7.7.4.Finally after multiple catch statements