one more test case for constant
[mono.git] / mcs / btests / AccessibilityC.vb
1 Imports System
2 Class C1
3         Protected Friend a As Integer=20
4 End Class
5 Class C2
6   Inherits C1
7         Public Sub S()
8                 Try
9                         If a<>20 Then
10                                 Throw New Exception("#A1-AccessibilityA:Failed-error accessing value of protected friend data member from derived class")
11                         
12                         End If
13                 Catch e As Exception
14                         Console.WriteLine(e.Message)
15                 End Try
16         End Sub
17 End Class
18
19 Module Accessibility
20         Sub Main()
21                 Dim myC1 As New C1()
22                  Try
23                         If myC1.a<>20 Then
24                                Throw New Exception("#A2-AccessibilityA:Failed-error accessing value of protected friend data member from another module") 
25                        End If
26                 Catch e As Exception
27                         Console.WriteLine(e.Message)
28                 End Try
29
30                 Dim myC2 As New C2()
31                 myC2.S()
32
33         End Sub
34 End Module