[Mono-list] Array.GetEnumerator()

Dwivedi , Ajay Kumar AjayKumar.Dwivedi@dresdner-bank.com
Fri, 8 Mar 2002 17:58:51 -0000


> You can't add fields to the Array class without the 
> corresponding change
> in the runtime. Do you really need to check for the version in the
> enumerator? The array size cannot change, so unless you have a test
> that shows otherwise, I'd simply ignore the version.

	The docs are really confusing over this.
<doc>
An enumerator remains valid as long as the collection remains unchanged. If
changes are made to the collection, such as adding, modifying, or deleting
elements, the enumerator is irrecoverably invalidated and the next call to
MoveNext or Reset throws an InvalidOperationException. 
</doc>
	We *can* modify array elements.
	However MS implementation doesnt do this for an fixed size array. So
we don't need to do the versioning either ;)

Happy Hacking,
Ajay