linux-packaging-mono/mcs/tests/gtest-iter-21.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

28 lines
355 B
C#

using System;
using System.Collections.Generic;
class C
{
IEnumerable<int> Test ()
{
Console.WriteLine ("init");
try {
yield return 1;
} finally {
int oo = 4;
Action a = () => Console.WriteLine (oo);
}
yield return 2;
}
public static int Main ()
{
var c = new C ();
foreach (var a in c.Test ())
{
}
return 0;
}
}