[Mono-dev] FW: [Bug 349875] Dictionary<TKey, TValue> stores values out of order.
josh at mouch.name
Wed Dec 19 14:40:48 EST 2007
I recall reading somewhere that when possible, mono will try to mimic the
behavior of .Net, to make it easier for people to migrate from the later to
the former. I can't find that reference now, so maybe it's all in my head.
From: Juraj Skripsky [mailto:js at hotfeet.ch]
Sent: Wednesday, December 19, 2007 2:17 PM
To: Josh Mouch
Cc: mono-devel-list at lists.ximian.com
Subject: Re: FW: [Bug 349875] Dictionary<TKey, TValue> stores values out of
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.
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?
> -----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.
> User juraj at hotfeet.ch added comment
> Juraj Skripsky <juraj at hotfeet.ch> changed:
> What |Removed |Added
|juraj at hotfeet.ch
> --- Comment #1 from Juraj Skripsky <juraj at hotfeet.ch> 2007-12-19 12:06:33
> According to MS.NET docs, this behavior is perfectly fine for the Values
> property (see
> "The order of the values in the Dictionary<(Of <(TKey,
> TValue>)>)..::.ValueCollection is unspecified, but it is the same order as
> 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
> 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