No exceptions occur in called method : Finally « Language Basics « VB.Net






No exceptions occur in called method

No exceptions occur in called method
Imports System

Public Class MainClass
    
    Shared Sub Main(ByVal args As String())
      

      ' Try block does not throw any exceptions 
      Try
         Console.WriteLine("In Does Not Throw Exception")
      Catch
         Console.WriteLine("This Catch never executes")
         ' Finally executes because corresponding Try executed
      Finally
         Console.WriteLine( _
            "Finally executed")
      End Try
      Console.WriteLine("End")
    End Sub
End Class


           
       








Related examples in the same category

1.Try with FinallyTry with Finally