摘要:
class MyClass:IEnumerator,IEnumerable { int[] dates; int ipoint; public MyClass() { dates =new int[] {1,2,4,3,6,5,7,8,9,0,9}; ipoint = 0; } #region IEnumerator 成员 public object Current { get { return dates[ipoint]; } } public bool MoveNext() { ipoint++; if (ipoint==10) { return false; } return true. 阅读全文