**** Merged from MCS ****
[mono-project.git] / mcs / btests / ForEachC1.vb
blob2bc958ba364c94204cc7c6e0925cbed8c6fcbecd
1 REM LineNo: 12
2 REM ExpectedError: BC30757
3 REM ErrorMessage: 'Goto labelA' is not valid because 'labelA' is inside a 'For'
4 REM or 'For Each' statement that does not contain this statement.
6 Imports System
8 Module ForEachC1
10 Sub Main()
11 Dim arr() As Integer = {1, 2, 3}
12 GoTo labelA
14 For Each i As Integer in arr
15 labelA:
16 Console.WriteLine(i)
17 Next
19 End Sub
21 End Module