Hi,

In search of the differences between struct and class I found this MSDN Doc
on Boxed Value Types:

http://msdn2.microsoft.com/en-us/library/f08s4k28(VS.90).aspx

The output is specified as this if you run this code
----------
////// doing this with a value type
4
2147483647
2147483647
////// doing this with a normal type
1
1
0
-------

I wonder I'm getting this output when I runf this code as it is.
---------------
////// doing this with a value type
4
4
2147483647
////// doing this with a normal type
1
1
0
--------------

Is this a bug or the ValueType semantics what specified in this doc is
proved wrong.

What should I assume?

Regards,
Ashok

Re: BUG:Incorrect behavior of Boxed Value Types in MSDN Docs... by Jon

Jon
Mon Aug 20 01:30:10 CDT 2007

AshokG <gw2ksoft@hotmail.com> wrote:
> In search of the differences between struct and class I found this MSDN Doc
> on Boxed Value Types:
>
> http://msdn2.microsoft.com/en-us/library/f08s4k28(VS.90).aspx

The behavior of parameters passed by reference in reflection calls
changed between .NET 1.1 and .NET 2.0, I believe. It looks like this is
referencing the old behavior.

It would be worth reporting this on connect.microsoft.com.

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too

Re: BUG:Incorrect behavior of Boxed Value Types in MSDN Docs... by AshokG

AshokG
Mon Aug 20 01:38:49 CDT 2007


Thanks Jon,

Thanks for the Infio. MS should have update this. I'll post the issue on
msconnect.

Regards,
Ashok

"Jon Skeet [C# MVP]" <skeet@pobox.com> wrote in message
news:MPG.21334545305162223ca@msnews.microsoft.com...
> AshokG <gw2ksoft@hotmail.com> wrote:
>> In search of the differences between struct and class I found this MSDN
>> Doc
>> on Boxed Value Types:
>>
>> http://msdn2.microsoft.com/en-us/library/f08s4k28(VS.90).aspx
>
> The behavior of parameters passed by reference in reflection calls
> changed between .NET 1.1 and .NET 2.0, I believe. It looks like this is
> referencing the old behavior.
>
> It would be worth reporting this on connect.microsoft.com.
>
> --
> Jon Skeet - <skeet@pobox.com>
> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
> If replying to the group, please do not mail me too