2004-11-08 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / btests / ArrayE.vb
1 Imports System\r
2 \r
3 Module ArrayE\r
4 \r
5     Dim a As Integer() = {1, 2, 3, 4}\r
6 \r
7     Public Property myprop() As Integer()\r
8         Get\r
9             Return a\r
10         End Get\r
11         Set(ByVal Value As Integer())\r
12             a = Value\r
13         End Set\r
14     End Property\r
15 \r
16     Sub main()\r
17 \r
18         ReDim Preserve myprop(6)\r
19         Dim arr As Integer() = {1, 2, 3, 4, 10, 12, 14}\r
20         myprop(4) = 10\r
21         myprop(5) = 12\r
22         myprop(6) = 14\r
23 \r
24         For i As Integer = 0 to myprop.Length - 1\r
25             Console.WriteLine(myprop(i))\r
26             If myprop(i) <> arr(i) Then\r
27                 Throw New Exception("#AE1 - Array Statement failed")\r
28             End If\r
29         Next\r
30 \r
31     End Sub\r
32 \r
33 End Module