projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2005-02-08 Atsushi Enomoto <atsushi@ximian.com>
[mono.git]
/
mcs
/
tests
/
2test-a3.cs
1
delegate void S ();
2
using System;
3
4
class X {
5
static int Main ()
6
{
7
int a = 1;
8
Console.WriteLine ("A is = " + a);
9
int c = a;
10
Console.WriteLine (c);
11
if (a != 1){
12
return 1;
13
}
14
15
S b = delegate {
16
if (a != 1)
17
Environment.Exit (1);
18
Console.WriteLine ("in Delegate");
19
a = 2;
20
if (a != 2)
21
Environment.Exit (2);
22
Console.WriteLine ("Inside = " + a);
23
a = 3;
24
Console.WriteLine ("After = " + a);
25
};
26
if (a != 1)
27
return 3;
28
b ();
29
if (a != 3)
30
return 4;
31
Console.WriteLine ("Back, got " + a);
32
33
return 0;
34
}
35
}