Can someone explain why this code outputs 5? I thought that packaging is happening here, the value is wrapped in an object and sent to the heap. And the reference stays on the stack. And then x and y will point to the same address on the heap. But it is not.
object x = 5;
object y = x;
x = 10;
Console.WriteLine(y);