Fw: [Mono-list] ArrayList.GetEnumerator

Gaurav Vaish gvaish@iitk.ac.in
Sat, 3 Nov 2001 16:05:17 +0530


Sorry Nick if this gets into your account for the second time.


Cheers,
Gaurav Vaish
----------------------------

----- Original Message -----
From: "Gaurav Vaish" <gvaish@iitk.ac.in>
To: "Nick Drochak" <ndrochak@gol.com>
Sent: Saturday, November 03, 2001 14:12
Subject: Re: [Mono-list] ArrayList.GetEnumerator


> Hello,
>     If you at the class members, you will find this definition attached:
>
> -------------
> .class auto ansi serializable nested private beforefieldinit
> ArrayListEnumeratorSimple
>        extends System.Object
>        implements System.Collections.IEnumerator,
>                   System.ICloneable
> {
> } // end of class ArrayListEnumeratorSimple
> ------------
>
>     So, there's a private class which Implements IEnumerator and
ICloneable.
> Is it this class whose instance is returned. A very small class. Just the
> following members:
>
> 1. private object currentElement
> 2. private int index
> 3. private ArrayList list
> 4. private int version (what for?)
>
>     functions:
>
> 5. public object Clone()
> 6. public bool MoveNext()
> 7. public void Reset()
>
> and property
>
> 8. object Current { get; }
>
> Cheers,
> Gaurav Vaish
> ----------------------------
>
> ----- Original Message -----
> From: "Nick Drochak" <ndrochak@gol.com>
> To: <mono-list@ximian.com>
> Cc: <vladimir@pobox.com>
> Sent: Saturday, November 03, 2001 13:39
> Subject: [Mono-list] ArrayList.GetEnumerator
>
>
> > Hi all,
> >
> > I found that one of my ReadOnlyCollection tests is failing because we
> > haven't implemented ArrayList.GetEnumerator() yet.
> >
> > I thought I'd just whip that one out real quick so my test would pass,
> > but low and behold I find out MS's ArrayList.GetEnumerator() returns an
> > object of type "ArrayListEnumeratorSimple."  I can't find a reference to
> > this class anywhere.
> >
> > Perhaps it's just an internal (embedded?) class in the MS ArrayList
> > class and any ol' class that implements IEnumerator will do?  Any ideas
> > or opinions on this one?  I hate it when my test fails.
> >
> > Thanks,
> > Nick D.
> >
> >
> >
> > _______________________________________________
> > Mono-list maillist  -  Mono-list@ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
>