public bool MoveNext() { _MoveNextRow: // Is this the start of a new row? if (InitializeRow) { // Are we out of rows? if (!NameEnumerator.MoveNext()) { return(false); } // Get the new row. RowIndex++; ColumnIndex = -1; ObjectEnumerator = CurrentSource.GetEnumerator(); InitializeRow = false; } // Is this the last column? if (!ObjectEnumerator.MoveNext()) { // Attempt to get the next row. InitializeRow = true; goto _MoveNextRow; } Current = ObjectEnumerator.Current; ColumnIndex++; return(true); }
public void Reset() { NameEnumerator.Reset(); RowIndex = -1; ColumnIndex = -1; ObjectEnumerator = null; Current = null; InitializeRow = true; }