repo.or.cz
/
mcs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2009-10-20 Jb Evain <jbevain@novell.com>
[mcs.git]
/
tests
/
gtest-autoproperty-01.cs
blob
84361aba69ab3b4f1e9f84a4b95c18568b5a3d5a
1
2
// Tests automatic properties
3
using
System
;
4
5
public class
Test
6
{
7
private class
A
8
{
9
public string
B { get; set; }
10
}
11
12
public string
Foo { get; set; }
13
public int
Answer { get; private set; }
14
15
public
Test
()
16
{
17
Answer
=
42
;
18
}
19
20
static int
Main
()
21
{
22
Test t
=
new
Test
();
23
t
.
Foo
=
"Bar"
;
24
if
(
t
.
Foo
!=
"Bar"
)
25
return
1
;
26
27
if
(
t
.
Answer
!=
42
)
28
return
2
;
29
30
A a
=
new
A
();
31
a
.
B
=
"C"
;
32
if
(
a
.
B
!=
"C"
)
33
return
3
;
34
35
return
0
;
36
}
37
}