1 ' Unhandled Exception: System.IndexOutOfRangeException: Index was outside
2 ' the bounds of the array.
6 Imports Nunit.Framework
11 <Test, ExpectedException (GetType (System.IndexOutOfRangeException))> _
12 Public Sub TestindexOutOfRange ()
13 Dim arr As Integer(,) = {{1, 2, 3}, {3, 4, 7}}
14 arr(0, 2) = arr(0, 0) * arr(0, 1)
15 arr(1, 2) = arr(1, 0) * arr(1, 1)
16 If arr(0, 2) <> 2 Or arr(1, 2) <> 12 Then
17 Throw New Exception("#A1 - Array Handling Statement failed")
19 ReDim Preserve arr(1, 1)