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

cs0202.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3d43218af533354ca00c252a12979b44ee5b6401 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// cs0202.cs: foreach requires that the return type 'Foo.E[]' of 'Foo.P.GetEnumerator()' must have a suitable public MoveNext method and public Current property
// Line: 18

public class Foo
{
        public class E {}
            
        public class P
        {
            public E[] GetEnumerator ()
            {
                return null;
            }
        }
       
        public static void Main ()
        {
            P o = new P ();
            foreach (P p in o)
            {
            }
        }
}