Updated project.
[mono.git] / mcs / btests / ExceptionHandlingC6.vb
1 REM LineNo: 18\r
2 REM ExpectedError: BC30451\r
3 REM ErrorMessage: Name 'j' is not declared\r
4 \r
5 Imports System\r
6 \r
7 Module ExceptionHandlingC6\r
8 \r
9     Sub Main()\r
10         Dim i As Integer\r
11         Try\r
12             Dim j As Integer = 2\r
13             i = j / i\r
14             i = 3\r
15             Console.WriteLine(i)\r
16         Catch e As Exception When i = 0\r
17             j = 3    ' Local varables from a Try block are not available in Catch block\r
18             Console.WriteLine(e.Message)\r
19         Finally\r
20             j = 4    ' Local varables from a Try block are not available in Finally block\r
21         End Try\r
22     End Sub\r
23 \r
24 End Module\r
25 \r