2 REM ExpectedError: BC30064
\r
3 REM ErrorMessage: 'ReadOnly' variable cannot be the target of an assignment.
\r
10 Public ReadOnly index As Integer = 0
\r
13 Dim arr() As Integer = {1, 2, 3}
\r
14 For Each index In arr
\r
15 Console.WriteLine("Hello World")
\r
20 Dim arr() As Integer = {1, 2, 3}
\r
21 For Each index In arr
\r
22 Console.WriteLine(index)
\r