2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / mbas / Test / tests / QualifiedNames.vb
1 Imports System\r
2 Namespace N1\r
3         Namespace N2\r
4                 Class C1\r
5                         Public Shared a As Integer\r
6                         Public Shared b As Integer\r
7                         Public Shared Function F() As Integer\r
8                                 Try\r
9                                         N1.N2.C1.a=20\r
10                                 Catch e As Exception\r
11                                         Console.WriteLine("error resolving a fully qualified name")\r
12                                 End Try\r
13                                 b=30\r
14                                 Return 47\r
15                         End Function\r
16                 End Class\r
17         End Namespace\r
18 End Namespace\r
19 Module QualifiedNames\r
20         Sub Main()\r
21                 If N1.N2.C1.F()<>47 Then\r
22                         Throw New Exception("#A1:QualifiedNames:Failed-Error accessing function using fully qualified names")\r
23                 End If\r
24                 If N1.N2.C1.a<>20 Then\r
25                         Throw New Exception("#A2:QualifiedNames:Failed-Error accessing variables using fully qualified names")\r
26                 End If\r
27                 If N1.N2.C1.b<>30 Then\r
28                         Throw New Exception("#A3:QualifiedNames:Failed-Error accessing variables using fully qualified names")\r
29                 End If\r
30         End Sub\r
31 End Module\r