D
Daniel O'Connell [C# MVP]
Willy Denoyette said:"MarkT [developmentor]" <[email protected]>
wrote in message
I just spent an hour looking at every place either nullable or switch
appears in the spec, and I could not find anything that explains the
behavior. However, the spec is pretty tough reading so I could easily
have
missed something. I tentatively vote "bug" on this one. You could submit
it
as a bug in the Microsoft Product Feedback Center to get some official
word
on it.
Note that only the latest v2.0 beta version (2.0.50727) includes the
latest Design Change Request made for VS2005 and the CLR, one of these DCR
relate to nullable types, maybe one could try this using this build.
Note that it's allways safe to file an issue to Product Feedback though.
No, it still works in that build. The change, as I undersatnd it, is that
nullable types are boxed into the underlying value instead of the
Nullable<T> value, ie.
int? x = null;
object y = x;
if (x == null)
...
With the change, x == null evaluates to true whereas before it would have
been false. http://blogs.msdn.com/somasegar/archive/2005/08/11/450640.aspx
covers the change.
The current spec certainly doesn't explain this behavior, so at worst it
would be an extended feature above and beyond the standard since the
behaviour is logical. Hopefuly they wil clear it up however.