2010-04-13 Sebastien Pouliot <sebastien@ximian.com>
[mono-project.git] / mcs / tests / gtest-anon-10.cs
blobb632c6bc2dbe7beab4145aae40e41520dcaafc50
1 using System;
2 using System.Collections.Generic;
4 class X
6 public IEnumerable<T> Test<T> (T a, T b)
8 yield return b;
9 b = a;
10 yield return a;
13 static int Main ()
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;
22 Console.WriteLine (sum);
23 return sum == 8 ? 0 : 1;