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
Merge pull request #1861 from saper/home-override
[mono-project.git]
/
mcs
/
tests
/
test-anon-134.cs
blob
01bd5922cf484d79012b19c955dce80aaae67188
1
using
System
;
2
3
public class
MyClass
4
{
5
public string
Foo
=
"Bar"
;
6
private int
answer
;
7
public int
Answer
{
8
get
{ return answer; }
9
set
{ answer = value; }
10
}
11
}
12
13
public class
Test
14
{
15
delegate void
D
();
16
17
public static int
Main
()
18
{
19
MyClass mc
=
null
;
20
21
D d
=
delegate
() {
22
mc
=
new
MyClass
()
{ Foo = "Baz", Answer = 42 }
;
23
};
24
25
d
();
26
27
if
(
mc
.
Foo
!=
"Baz"
)
28
return
1
;
29
30
if
(
mc
.
Answer
!=
42
)
31
return
2
;
32
33
return
0
;
34
}
35
}