[Mono-bugs] [Bug 491858] Iterator implementation for generics is incompatible with MS implementation

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Apr 3 11:14:20 EDT 2009


User jbevain at novell.com added comment

--- Comment #3 from Jb Evain <jbevain at novell.com>  2009-04-03 09:14:19 MDT ---
The note of Dictionary<K,V>.Enumerator.Current is pretty clear:

«For better performance, this property does not throw an exception if the
enumerator is positioned before the first element or after the last element.
The value of the property is undefined. To get an exception instead, cast the
Dictionary::Enumerator to the System.Collections::IEnumerator interface before
using it.»

So the value is undefined, but the behavior is well defined. Same goes for
List<T>.Enumerator and HashSet<T>.Enumerator.

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list