**** Merged from MCS ****
[mono-project.git] / mcs / btests / ForC3.vb
blobb242e8800d4ca597bb72df007daf7472f2aab57b
1 REM LineNo: 19
2 REM ExpectedError: BC30064
3 REM ErrorMessage: 'ReadOnly' variable cannot be target of an assignment.
5 Imports System
7 Module ForC3
9 Class C1
10 Public ReadOnly index As Integer = 0
12 Sub New()
13 For index = 0 To 10
14 Console.WriteLine("Hello World")
15 Next
16 End Sub
18 Sub f()
19 For index = 11 To 14
20 Console.WriteLine("Hello World")
21 Next
22 End Sub
24 End Class
26 Sub main()
27 Dim c As New C1()
28 c.f()
29 End Sub
31 End Module