By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,561 Members | 3,221 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,561 IT Pros & Developers. It's quick & easy.

Breaking changes in .Net 2.0 - Something missing

P: n/a
I saw that Microsoft have released a list of breaking changes in .Net here:
http://msdn.microsoft.com/netframewo...e/default.aspx

While this is useful, it seems to be missing a change that has broken a lot
of my applications, relating to the order in which members are returned by
reflection. At least I can't find it. I reported the bug on ladybug:
http://lab.msdn.microsoft.com/produc...7-0ee741027f34

Also discussed in my blog:
http://dotnetjunkies.com/WebLog/john...28/128723.aspx

Can anyone at Microsoft see that this is added to the list? I think it's
quite an important change.
Dec 3 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi John,

Thanks for your feedback. But I didn't see this in the breaking changes
list. IMO, relying on the order of the returned methods from Reflection is
not reliable.

I suggest you sign in into the feedback page and suggest the product team
to make this breaking change listed. Because in this way, the products team
will see this immediately.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Dec 3 '05 #2

P: n/a
I relied on the order of returned methods for caching purposes.

In my case the cache (consisting of a member-index to member lookup) was
created at application startup, and was referred to during application
execution. In 1.1 this worked (because members would be returned in the same
order throughout the application session).

In .Net 2.0 it doesn't work because every time you ask for a list of
members, they come back in a random order. This randomness was added by the
..Net team in 2.0 to ensure you don't rely on the order.

Relying on the order of members between sessions (ie. in serialization)
certainly isn't a good idea, many things can change between sessions. But
*during* the session objects won't be changing! And so they should be
reliable. Their solution to the problem of having people rely on the order
of reflection members being returned doesn't take my scenario into account.
It used to work in 1.1 and doesn't in 2.0 and that makes it a breaking
change.

Heck my applications break what more proof do I need to give! :)

When you say feedback page - do you mean in ladybug? or the feedback page
for the breaking changes list?

Thanks for responding,
John

"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:66**************@TK2MSFTNGXA02.phx.gbl...
Hi John,

Thanks for your feedback. But I didn't see this in the breaking changes
list. IMO, relying on the order of the returned methods from Reflection is
not reliable.

I suggest you sign in into the feedback page and suggest the product team
to make this breaking change listed. Because in this way, the products
team
will see this immediately.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Dec 3 '05 #3

P: n/a

"John Wood" <te*****@online.nospam> wrote in message
news:LW************@fe12.lga...
I relied on the order of returned methods for caching purposes.
In .Net 2.0 it doesn't work because every time you ask for a list of
members, they come back in a random order.
Thanks for the heads-up on this. I'm also chaching memeber/field index
offset info.
This randomness was added by the .Net team in 2.0 to ensure you don't
rely on the order.
Okay, that's *really* stupid. There are so many ways for people to shoot
themselves in the foot, that to try and stop this one way and in the process
disable a sensable optimization is pretty silly. I don't depend on C struct
layouts between machines or even compiler versions, but I certainly expect
them to be the same every time I run the same program so I can read my own
file. Next they'll be adding a random epsilon to all floating point values
because you shouldn't depend of those lower bits anyway...

m
Relying on the order of members between sessions (ie. in serialization)
certainly isn't a good idea, many things can change between sessions. But
*during* the session objects won't be changing! And so they should be
reliable. Their solution to the problem of having people rely on the order
of reflection members being returned doesn't take my scenario into
account. It used to work in 1.1 and doesn't in 2.0 and that makes it a
breaking change.

Heck my applications break what more proof do I need to give! :)

When you say feedback page - do you mean in ladybug? or the feedback page
for the breaking changes list?

Thanks for responding,
John

"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:66**************@TK2MSFTNGXA02.phx.gbl...
Hi John,

Thanks for your feedback. But I didn't see this in the breaking changes
list. IMO, relying on the order of the returned methods from Reflection
is
not reliable.

I suggest you sign in into the feedback page and suggest the product team
to make this breaking change listed. Because in this way, the products
team
will see this immediately.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."


Dec 4 '05 #4

P: n/a
Hi John,

In this case, you'd better contact the product team on this issue to get a
workaround from them. You just sign in on that feedback page to continue
posting. The product team might give you a workaround.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Dec 6 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.