* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / mbas / Test / errors / ForC2.vb
1 REM LineNo: 21\r
2 REM ExpectedError: BC30039\r
3 REM ErrorMessage: Loop control variable cannot be a property or a late-bound indexed array.\r
4 \r
5 Imports System\r
6 \r
7 Module ForC2\r
8 \r
9     Private index As Integer = 0\r
10     Public Property myindex() As Integer\r
11         Get\r
12             Return index\r
13         End Get\r
14         Set(ByVal Value As Integer)\r
15             index = Value\r
16         End Set\r
17     End Property\r
18 \r
19     Sub main()\r
20 \r
21         For myindex = 0 To 10\r
22             Console.WriteLine("Hello World")\r
23         Next\r
24 \r
25     End Sub\r
26 \r
27 End Module