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