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
remove NotWorking
[mcs.git]
/
tests
/
gtest-anon-34.cs
blob
090ab843c63d5530acb9c7b00c874c0b446d5e0f
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
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
}