Quote:
Originally Posted by pegasus001
Practically the same. Dont you think. But now that i read it it is true that they are structs.
|
No boxing refers to a value type put inside an object on the heap. Its only that. Int32, Double etc are not inside anything. They are just there on the stack. Example
int i = 90; //Not Boxed on stack
Object o = i; //Boxed on heap
int j = (int) u //Unboxed and back on heap.
This is a very important thing to learn. The difference between stucts and classes is huge. People who use a struct(value type) type like it is a reference type(class) will run into problems at some point, believe me I have.