// move to the next element of the iteration public void Next() { i++; if (i >= collection.Rows()) { i = 0; j++; } }
// test whether or not the iteration has finished public bool IsDone() { return(i >= collection.Rows()); }