[Mono-list] Array Class
Dwivedi , Ajay Kumar
AjayKumar.Dwivedi@dresdner-bank.com
Mon, 11 Mar 2002 07:15:02 -0000
I found some bugs in the patch ;)
1. [MonoTODO("This should implement IEnumerable too")]
The only member of IEnumerable is GetEnumerator.
And you seem to have implemented it :)
2. All of the IList functions implemetations are Explicit. So
public int Add (object value) should be infact
int IList.Add (object value)
The list of all such methods is:
IList.Add
IList.Clear
IList.Contains
IList.IndexOf
IList.Insert
IList.Remove
IList.RemoveAt
3. GetEnumerator() should no more be a MonoTODO :)
Happy Hacking,
Ajay
> -----Original Message-----
> From: Nick Drochak [mailto:ndrochak@gol.com]
> Sent: 11 March 2002 11:30
> To: Mono-List
> Subject: Re: [Mono-list] Array Class
>
>
> | > 2. Implementing the iterator for all dimensions should be
> | very easy if
> | > we have "internal extern object GetValueImpl (int pos);"
> | implemented.
> | > I suppose this would return an object based on position and not
> | > indices.
> |
> | This function already exists as interncall. It takes a
> | position and returns an object.
> |
>
> I changed the Enumerator to use Ajay's version. This should work fine
> with both single and multi-dimensional arrays since it's based on
> positions, not indicies. Thanks Ajay.
>
> Since MS's implementation does not throw an error after a mutation, I
> removed all the versioning stuff; much to Paolo's relief, I'm sure :)
>
> I also included the IList interface methods since those are needed in
> the Nunit tests. Using Ajay's hint, I utilized GetValueImpl (int pos)
> in order to simplify the code for Contains () and IndexOf ().
>
> I've attached the diff for review again.
>
> Thanks,
> Nick D.
>
>
>
>
>
>