| Re: VB.NET : Why doesn't FINALLY execute? -
06-04-2007, 09:46 AM
Almost everybody in this newsgroup is using VB6 or lower. While you may
get a stray answer to VB.NET questions here, you should ask them in
newsgroups devoted exclusively to .NET programming. Look for newsgroups
with either the word "dotnet" or "vsnet" in their name.
For the microsoft news server, try these newsgroups...
microsoft.public.dotnet.general
microsoft.public.dotnet.languages.vb
microsoft.public.vsnet.general
There are some others, but these should get you started.
Rick - MVP
"Raymond Lesher" <EMAIL REMOVED> wrote in message
news:EMAIL REMOVED om...
> Why does the finally clause in the Test method (below) NOT execute in
> my "foo" example, but DOES execute in my "bar" example?
>
>
> 'Test-Finally does NOT execute
> Private Sub foo()
> Test()
> End Sub
>
> 'Test-Finally DOES execute
> Private Sub bar()
> Try
> Test()
> Catch ex As Exception
>
> End Try
> End Sub
>
> Private Sub Test()
>
> Dim x As Double
>
> Try
> x = 1 / 0
>
> Catch ex As Exception
> Console.WriteLine("Exception Block")
>
> Finally
> Console.WriteLine("Finally Block")
>
> End Try
>
> End Sub |