Updated with review feedback.
[mono.git] / mcs / errors / cs1579-4.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         public Func<IEnumerator> GetEnumerator;
20 }