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
2010-04-13 Sebastien Pouliot <sebastien@ximian.com>
[mono-project.git]
/
mcs
/
tests
/
gtest-lambda-12.cs
blob
6a7ea775323628968db9d692321029c5dfc34b82
1
2
3
using
System
;
4
5
public delegate void
Func
<
TA
> (
TA arg0
);
6
7
class
Demo
8
{
9
static void
F
<
T
> (
T
[]
values
,
T
value
,
Func
<
T
>
f
)
10
{
11
Console
.
WriteLine
(
values
[
0
]);
12
f
(
value
);
13
Console
.
WriteLine
(
values
[
0
]);
14
}
15
16
static int
Main
()
17
{
18
int
[]
a
=
new int
[]
{ 10 }
;
19
F
(
a
,
5
,
i
=>
a
[
0
] =
i
);
20
21
if
(
a
[
0
] !=
5
)
22
return
1
;
23
24
return
0
;
25
}
26
}