static void Main(string[] args) { var list = new MeList <int>() { 1, 2, 3 }; //Add method is used by default when IEnumerable is implemented list.Add(11); list.Add(12); list.Add(13); //IEnumerator<int> ienum = list.GetEnumerator(); //ienum.MoveNext(); Console.WriteLine(ienum.Current); foreach (var i in list) { Console.WriteLine(i); } }
public MeEnumerator(MeList <T> array) { Array = array; }