[Mono-dev] FW: [Bug 349875] Dictionary<TKey, TValue> stores values out of order.

Juraj Skripsky js at hotfeet.ch
Wed Dec 19 14:17:22 EST 2007


Hi Josh,

Mono is support to follow the MS .net _design_ not the _implementation_.
If the docs don't state that you can depend on the order of the
elements, you shouldn't do so. I consider an app relying on this order
to be buggy.

- Juraj

PS: please always send a copy of such mails to the mailing lists. Others
might be interested.


On Wed, 2007-12-19 at 14:09 -0500, Josh Mouch wrote:
> Isn't mono supposed to mimic MS .Net behavior?
> 
> Josh
> 
> -----Original Message-----
> From: bugzilla_noreply at novell.com [mailto:bugzilla_noreply at novell.com] 
> Sent: Wednesday, December 19, 2007 2:07 PM
> To: josh+novell at mouch.name
> Subject: [Bug 349875] Dictionary<TKey, TValue> stores values out of order.
> 
> https://bugzilla.novell.com/show_bug.cgi?id=349875
> 
> User juraj at hotfeet.ch added comment
> https://bugzilla.novell.com/show_bug.cgi?id=349875#c1
> 
> 
> Juraj Skripsky <juraj at hotfeet.ch> changed:
> 
>            What    |Removed                                         |Added
> ----------------------------------------------------------------------------
>                  CC|                                                |juraj at hotfeet.ch
>              Status|NEW                                             |RESOLVED
>          Resolution|                                                |INVALID
> 
> 
> 
> 
> --- Comment #1 from Juraj Skripsky <juraj at hotfeet.ch>  2007-12-19 12:06:33 MST ---
> According to MS.NET docs, this behavior is perfectly fine for the Values
> property (see
> http://msdn2.microsoft.com/en-us/library/ekcfxy3x.aspx):
> 
> "The order of the values in the Dictionary<(Of <(TKey,
> TValue>)>)..::.ValueCollection is unspecified, but it is the same order as the
> associated keys in the Dictionary<(Of <(TKey, TValue>)>)..::.KeyCollection
> returned by the Keys property."
> 
> As for the enumeration of the Dictionary'2 itself, the documentation does not
> state a required ordering of the returned elements.
> 
> Setting to resolved/fixed.
> Please reopen if the docs support your claim.
> 
> 




More information about the Mono-devel-list mailing list