summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0202.cs
blob: bd17dd913025f08807aad9896d5794a9a1fdaff9 (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: foreach statement 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)
            {
            }
        }
}