473,395 Members | 1,677 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

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/lib...28(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
Aug 20 '07 #1
2 1227
AshokG <gw******@hotmail.comwrote:
In search of the differences between struct and class I found this MSDN Doc
on Boxed Value Types:

http://msdn2.microsoft.com/en-us/lib...28(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 - <sk***@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
Aug 20 '07 #2

Thanks Jon,

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

Regards,
Ashok

"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:MP*********************@msnews.microsoft.com. ..
AshokG <gw******@hotmail.comwrote:
>In search of the differences between struct and class I found this MSDN
Doc
on Boxed Value Types:

http://msdn2.microsoft.com/en-us/lib...28(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 - <sk***@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

Aug 20 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Kenneth Baltrinic | last post by:
I have the following routine that is always throwing the error at the end. It never returns from within the foreach loop because the if expression is always evaluating to false apparently. This is...
3
by: Laura T. | last post by:
The following code is driving me so crazy, that I'm thinking it's a "feature" or a.. ....dare I say it... a BUG. I'm using VS 2003. I've created a new value type (struct) called MyInt. MyInt has...
3
by: Ralph Purtcher-Wydenbruck | last post by:
This is a worrying bug, and indicates a potential problem in the Framework CLR. This bug affected a project I was working on, which behaved differently when run from the Visual Studio IDE than when...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 393 open (+15) / 3315 closed (+17) / 3708 total (+32) Bugs : 908 open (+22) / 5975 closed (+49) / 6883 total (+71) RFE : 223 open...
3
by: Don Burden | last post by:
We've started converting some applications to the .NET 2.0 framework. When compiling in VS 2005, I'm getting a warning on this line: return (unitWidth != null ) ? unitWidth : new Unit("0px"); ...
5
by: hg | last post by:
Hi, In C/C++ I got used to write an expression like so: #define TEST 0 if (TEST == value) { }
1
by: Steven Spencer \(Spinalogic\) | last post by:
I have an error and I would say this is at compiler level in the VB.net language "If Not SQLConnectionString = "" Then 'If ds.Tables("Images") Is Nothing Then 'to avoid repeating when...
2
by: AshokG | last post by:
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...
19
by: Chris Mullins [MVP - C#] | last post by:
I hit this bug last night in some test code I had written. It took a few minutes to figure out what the root cause was, and it left me thinking, "Wow. That was an interesting one that doesn't come...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.