projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2005-07-24 Atsushi Enomoto <atsushi@ximian.com>
[mono.git]
/
mcs
/
tests
/
test-anon-06.cs
1
//
2
// Tests capturing of variables
3
//
4
using System;
5
6
delegate void S ();
7
8
class X {
9
static int Main ()
10
{
11
int a = 1;
12
if (a != 1)
13
return 1;
14
15
Console.WriteLine ("A is = " + a);
16
S b= delegate {
17
Console.WriteLine ("on delegate");
18
a = 2;
19
};
20
if (a != 1)
21
return 2;
22
b();
23
if (a != 2)
24
return 3;
25
Console.WriteLine ("OK");
26
return 0;
27
}
28
}
29