repo.or.cz
/
mono-project
/
dkf.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2009-02-10 Jeffrey Stedfast <fejj@novell.com>
[mono-project/dkf.git]
/
mcs
/
tests
/
test-70.cs
blob
6fe8da995e89c2f8c3a45588934ca63c31718c2a
1
//
2
// Tests the right settings for overrides
3
//
4
5
class
X
{
6
7
public virtual int
A
{
8
get
{
9
return
1
;
10
}
11
}
12
13
public virtual int
B
()
14
{
15
return
1
;
16
}
17
}
18
19
class
Y
:
X
{
20
public override int
A
{
21
get
{
22
return base
.
A
+
2
;
23
}
24
}
25
26
public override int
B
()
27
{
28
return base
.
B
() +
1
;
29
}
30
}
31
32
class
Z
{
33
static int
Main
()
34
{
35
Y y
=
new
Y
();
36
X x
=
new
X
();
37
38
if
(
y
.
B
() !=
2
)
39
return
1
;
40
if
(
y
.
A
!=
3
)
41
return
2
;
42
if
(
x
.
A
!=
1
)
43
return
3
;
44
if
(
x
.
B
() !=
1
)
45
return
4
;
46
return
0
;
47
}
48
}