repo.or.cz
/
mono.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2010-06-21 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git]
/
mono
/
tests
/
property.cs
blob
91d1857d3afd1dac2ef95db9fbb520a77988ceb1
1
using
System
;
2
3
public class
TestProp
{
4
5
private int
my_prop
;
6
7
public int
MyProp
{
8
get
{return my_prop;}
9
set
{my_prop = value;}
10
}
11
12
public
TestProp
(
int
v
) {
13
my_prop
=
v
;
14
}
15
16
public static int
Main
() {
17
TestProp p
=
new
TestProp
(
2
);
18
if
(
p
.
MyProp
!=
2
)
19
return
1
;
20
p
.
MyProp
=
54
;
21
if
(
p
.
MyProp
!=
54
)
22
return
2
;
23
return
0
;
24
}
25
}