**** Merged from MCS ****
[mono-project.git] / mcs / mbas / Test / errors / NameSpaceD.vb
blobd9bcbfe8862c636f227c26992d9c60d5e5b232fc
1 REM LineNo: 27
2 REM ExpectedError: BC30002
3 REM ErrorMessage: Type 'Exception' is not defined.
5 'Imports System
6 Namespace NS1
7 Module M
8 Public a As Integer=20
9 End Module
10 End Namespace
11 Namespace NS2
12 Module M
13 Dim a As Integer=30
14 Sub Main()
15 Dim a As Integer=40
16 System.Console.WriteLine(a)
17 Try
18 If a<>40 Then
19 Throw New System.Exception("#A1:Namespace:Failed")
20 End If
21 If NS1.M.a<>20 Then
22 Throw New System.Exception("#A2:Namespace:Failed")
23 End If
24 If NS2.M.a<>30 Then
25 Throw New System.Exception("#A3:Namespace:Failed")
26 End If
27 Catch e As Exception
28 System.Console.WriteLine(e.Message)
29 End Try
30 End Sub
31 End Module
32 End Namespace