repo.or.cz
/
mono-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2004-11-07 Ben Maurer <bmaurer@ximian.com>
[mono-project.git]
/
mcs
/
btests
/
InheritanceF.vb
blob
87de3d035cc9cdafac66392d1041dbd91702c42b
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