Java's Enumeration translated to C# IEnumerator -
in practice seems simple i'm getting confused it. java's enumeration hasmoreelements() , nextelement() methods related work differently c#'s ienumerator movenext() , current() properties of course. how translate this?: //class declaration, fields constructors, unrelated code etc. private vector atomlist = new vector(); public int getnumberbasis() { enumeration basis = this.getbasisenumeration(); int numberbasis = 0; while (basis.hasmoreelements()) { object temp = basis.nextelement(); numberbasis++; } return numberbasis; } public enumeration getbasisenumeration() { return new basisenumeration(this); } private class basisenumeration implements enumeration { enumeration atoms; enumeration basis; public basisenumeration(molecule molecule) { atoms = molecule.getatomenumeration(); basis = ((atom) atoms.nextelement()).getbasisenumeration(); } public boolean hasmoreelements() { ...