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-anon-10.cs
blob
b632c6bc2dbe7beab4145aae40e41520dcaafc50
1
using
System
;
2
using
System
.
Collections
.
Generic
;
3
4
class
X
5
{
6
public
IEnumerable
<
T
>
Test
<
T
> (
T a
,
T b
)
7
{
8
yield return
b
;
9
b
=
a
;
10
yield return
a
;
11
}
12
13
static int
Main
()
14
{
15
X x
=
new
X
();
16
long
sum
=
0
;
17
foreach
(
long
i
in
x
.
Test
(
3
,
5
)) {
18
Console
.
WriteLine
(
i
);
19
sum
+=
i
;
20
}
21
22
Console
.
WriteLine
(
sum
);
23
return
sum
==
8
?
0
:
1
;
24
}
25
}