Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-anon-52.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d653736c11f44a728ac4d0ac753cbabd1acbed09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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;
                }
        }
 
        static int Main ()
        {
                IEnumerator enumerator = GetIt (new int [] { 1, 2, 3});
		enumerator.MoveNext ();
                return 0;
        }
}