public static int Main(string[] args) { FooList l = new FooList(); Foo f1 = new Foo("First"); Foo f2 = new Foo("Second"); l.Add(f1); l.Add(f2); foreach (Foo f in l) { } if (FooList.foo_current_called != true) return 1; if (FooList.ienumerator_current_called != false) return 2; Console.WriteLine ("Test passes"); return 0; }
public static int Main(string[] args) { FooList l = new FooList(); Foo f1 = new Foo("First"); Foo f2 = new Foo("Second"); l.Add(f1); l.Add(f2); foreach (Foo f in l) { } if (FooList.foo_current_called != true) { return(1); } if (FooList.ienumerator_current_called != false) { return(2); } Console.WriteLine("Test passes"); return(0); }
public FooEnumerator(FooList mappings) { this.temp = (IEnumerable)(mappings); this.baseEnumerator = temp.GetEnumerator(); }
public FooEnumerator(FooList mappings) { this.temp = (IEnumerable) (mappings); this.baseEnumerator = temp.GetEnumerator(); }