2010-06-21 Atsushi Enomoto <atsushi@ximian.com>
[mcs.git] / tests / gtest-330.cs
blob6c46ea427315fecb4a17e4f32ccd87928dcc22df
1 using System;
2 using System.Collections;
3 using System.Collections.Generic;
5 public class BaseCollection<T> : IEnumerable<T>
7 protected List<T> items = new List<T> ();
9 IEnumerator<T> IEnumerable<T>.GetEnumerator ()
11 return items.GetEnumerator ();
14 IEnumerator IEnumerable.GetEnumerator ()
16 return items.GetEnumerator ();
20 public class BaseIntList<T> : BaseCollection<T>
24 public class IntList : BaseIntList<int>
28 class X
30 public static void Main ()
32 IntList list = new IntList ();
33 foreach (int i in list) {
34 Console.WriteLine (i);