I've been reading that boxing converts a value type to a reference type. If I understand this
correctly, the type on the heap is copied onto the stack.
This sound inefficient to me. Why doesn't C# just create a reference variable that points to the
object on the heap, which would act in a similar way to a true reference type?
correctly, the type on the heap is copied onto the stack.
This sound inefficient to me. Why doesn't C# just create a reference variable that points to the
object on the heap, which would act in a similar way to a true reference type?
Comment