Added new tests for Loop Statements
[mono.git] / mcs / btests / InheritanceF.vb
1 'Testing access to protected members of a class from it's derived class
2 Class C1
3         Protected a As Integer
4         Protected Sub S()
5                 a=47
6         End Sub
7 End Class
8 Class C2
9     Inherits C1
10         Public Function F() As Integer
11                 S()
12                 Return a
13         End Function
14 End Class
15 Module Inheritence
16         Sub Main()
17                 Dim myC As New C2()
18                 Dim b As Integer=myC.F()
19                 If b<>47 Then
20                         Throw New System.Exception("InheritenceF:Failed-Error in accessing protected member from a derived class")
21                 End If
22         End Sub
23 End Module