a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
27 lines
675 B
C#
27 lines
675 B
C#
using System;
|
|
using System.Collections;
|
|
|
|
class X {
|
|
delegate void A ();
|
|
|
|
static IEnumerator GetIt (int [] args)
|
|
{
|
|
foreach (int arg in args) {
|
|
Console.WriteLine ("OUT: {0}", arg);
|
|
A a = delegate {
|
|
Console.WriteLine ("arg: {0}", arg);
|
|
return;
|
|
};
|
|
a ();
|
|
yield return arg;
|
|
}
|
|
}
|
|
|
|
public static int Main ()
|
|
{
|
|
IEnumerator enumerator = GetIt (new int [] { 1, 2, 3});
|
|
enumerator.MoveNext ();
|
|
return 0;
|
|
}
|
|
}
|