use MOONLIGHT symbol
[mcs.git] / errors / cs1579-2.cs
blobe4baff11073332bed0aafbb6dac45e39dda04c0b
1 // cs1579-2.cs: foreach statement cannot operate on variables of type `Foo' because it does not contain a definition for `GetEnumerator' or is not accessible
2 // Line: 12
4 using System;
5 using System.Collections;
7 public class Test
9 public static void Main ()
11 Foo f = new Foo ();
12 foreach (object o in f)
13 Console.WriteLine (o);
17 public class Foo
19 internal IEnumerator GetEnumerator ()
21 return new ArrayList ().GetEnumerator ();