Boxing information / quiz

J

J.Marsch

Hello all:

I am trying to introduce the concept of boxing (and some of the hang-ups) to
some developers that are coming onto a project. A while back, I read a
really cool article that was formatted as a quiz. It introduced a number of
the weird little nuances that you run into when implicit boxing occurs in
your code (like values not being changed when you expected them to -- do to
the fact that a copy was made during the box or unbox operation).

I would love to share this article with some of the other people on the
project, but I don't seem to have it bookmarked anymore, and I can't find
it. Has anyone run across it (or a similar article)?
 
D

DalePres

Funny you should ask. I saw that site today. Hopefully I'll remember your
question while I"m at work tomorrow and I can pull it from my history.

Dale
 
J

J.Marsch

I'd very much appreciate it! Thanks!


DalePres said:
Funny you should ask. I saw that site today. Hopefully I'll remember your
question while I"m at work tomorrow and I can pull it from my history.

Dale

hang-ups) number
 
D

DalePres

I can't believe I can't find it. I checked history on my laptop, home PC,
and work PC.. I had searched for information on boxing and unboxing int
arrays and even tried the search again.

Well, I wasn't much help but I'm sure you can find enough on boxing/unboxing
to teach it.

Dale
 
P

Peter Huang

Hi Jeremy,

It is a pity that Dale did not find that link for you.
Here I find some links about boxing and unboxing.
Boxing and Unboxing
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/
vclrfBoxingUnboxingPG.asp

Type Fundamentals by Jeffrey Richter
Boxing and Unboxing
http://msdn.microsoft.com/msdnmag/issues/1200/dotnet/

Introduction to .NET Framework Types and Other Classes
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnguinet/ht
ml/drguinet1_update.asp

Hope this helps.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

J.Marsch

Thanks for the links, Peter. And thanks for trying to find that elusive
page for me Dale!

Regards

-- Jeremy
 
M

mikeb

J.Marsch said:
Hello all:

I am trying to introduce the concept of boxing (and some of the hang-ups) to
some developers that are coming onto a project. A while back, I read a
really cool article that was formatted as a quiz. It introduced a number of
the weird little nuances that you run into when implicit boxing occurs in
your code (like values not being changed when you expected them to -- do to
the fact that a copy was made during the box or unbox operation).

I would love to share this article with some of the other people on the
project, but I don't seem to have it bookmarked anymore, and I can't find
it. Has anyone run across it (or a similar article)?

Is this the article you're looking for?

http://msdn.microsoft.com/library/en-us/dncscol/html/csharp02152001.asp
 
J

J.Marsch

Thanks Mikeb. This helps a lot. I think that is the one that I was
thinking. Actually, now I'm thinking that maybe I was remembering two
different web pages. This one is definitely one of them. The other listed
some unexpected effects that you might get when you start trying to assign
values to boxed items -- the values would not seem to "stick" because you
are really manipulating a copy. I don't remember exactly how the examples
went, though.

Thanks for the page, though. I know that's what I was thinking of. Now I
just know that I was really after two pages <g>

-- Jeremy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top