let\'s have this code :
class MyList : IEnumerable, IEnumerator { int[] A = { 1, 2, 3, 4, 5 }; int i = -1; #region IEnumerator Members pub
This also works:
public bool MoveNext() { if(i < 5) { i++; return true; } else { i = -1; return false; } }