projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add CopyPath, CopyPathFlat, AppendPath
[mono.git]
/
mcs
/
tests
/
gtest-anon-10.cs
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
}