Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / errors / cs1579-2.cs
1 // Cs1579: foreach statement cannot operate on variables of type `Foo' because it does not contain a definition for `GetEnumerator' or is inaccessible
2 // Line: 12
3
4 using System;
5 using System.Collections;
6
7 public class Test
8 {
9         public static void Main ()
10         {
11                 Foo f = new Foo ();
12                 foreach (object o in f)
13                         Console.WriteLine (o);
14         }
15 }
16
17 public class Foo
18 {
19         internal IEnumerator GetEnumerator ()
20         {
21                 return new ArrayList ().GetEnumerator ();
22         }
23 }