1 // CS1579: foreach statement cannot operate on variables of type `C' because it does not contain a definition for `GetEnumerator' or is inaccessible
6 public class Enumerator
8 public bool MoveNext ()
13 public int Current { get; set; }
19 public Enumerator GetEnumerator ()
21 return new Enumerator ();
27 new internal Enumerator GetEnumerator ()
29 return new Enumerator ();
35 public static void Main ()
37 foreach (var e in new C ())
38 Console.WriteLine (e);