Added 'REM Target: library' to the files that need to be compiled as a
[mono.git] / mcs / btests / Array3.vb
1 ' Unhandled Exception: System.IndexOutOfRangeException: Index was outside 
2 ' the bounds of the array.
3
4 Imports System
5
6 Module Array3
7
8     Sub Main()
9         Dim arr As Integer(,) = {{1, 2, 3}, {3, 4, 7}}
10         arr(0, 2) = arr(0, 0) * arr(0, 1)
11         arr(1, 2) = arr(1, 0) * arr(1, 1)
12         If arr(0, 2) <> 2 Or arr(1, 2) <> 12 Then
13             Throw New Exception("#A1 - Array Handling Statement failed")
14         End If
15         ReDim Preserve arr(1, 1)
16         arr(1, 2) = 2
17     End Sub
18
19 End Module
20