Re: Boxing and Unboxing ??
- From: Arne Vajhøj <arne@xxxxxxxxxx>
- Date: Sat, 13 Jan 2007 20:26:10 -0500
Peter Olcott wrote:
What I am looking for is all of the extra steps that form what is referred to as boxing and unboxing. In C/C++ converting a value type to a reference type is a very simple operation and I don't think that there are any runtime steps at all. All the steps are done at compile time. Likewise for converting a reference type to a value type.
in C/C++
int X = 56;
int *Y = &X;
Now both X and *Y hold 56, and Y is a reference to X;
That code is not equivalent to what we are discussing in C#.
In fact it does not really have any equivalent in C# (not using
unsafe code).
Arne
.
- Follow-Ups:
- Re: Boxing and Unboxing ??
- From: Peter Olcott
- Re: Boxing and Unboxing ??
- References:
- Boxing and Unboxing ??
- From: Peter Olcott
- Re: Boxing and Unboxing ??
- From: Bob Graham
- Re: Boxing and Unboxing ??
- From: Peter Olcott
- Boxing and Unboxing ??
- Prev by Date: Re: Boxing and Unboxing ??
- Next by Date: Re: Boxing and Unboxing ??
- Previous by thread: Re: Boxing and Unboxing ??
- Next by thread: Re: Boxing and Unboxing ??
- Index(es):
Relevant Pages
|