[Mono-list] Array Class
Mon, 11 Mar 2002 12:57:48 +0530 (IST)
This mail is in response to:
>Date: Mon, 11 Mar 2002 07:15:02 -0000
>From: "Dwivedi , Ajay Kumar" <AjayKumar.Dwivedi@dresdner-bank.com>
>To: 'Nick Drochak' <email@example.com>, Mono-List <firstname.lastname@example.org>
>Subject: RE: [Mono-list] Array Class
>I found some bugs in the patch ;)
>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:
No, I think this is correct. There's no need to explicitly have
the methods as IList.<something> unless you wish to change the
visibility of the final implementation of the methods. Since the
methods Add(object), Clear() etc are defined public, there's no
explicit implementation required.
Were the visible implementations as:
protected int Add(object)
(and similarly for others) that you needed Explicit
>3. GetEnumerator() should no more be a MonoTODO :)
>> -----Original Message-----
>> From: Nick Drochak [mailto:email@example.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.
>> Nick D.
>Mono-list maillist - Monofirstname.lastname@example.org