KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
i tried: int i = 5; object o1 = i; // boxing the i into object (so it should be a reference type) object o2 = o1; // set object reference o2 to o1 (so o1 and o2 point to same place at the heap) o2 = 8; // put 8 to at the place at the heap where o2 points after running this code, value in o1 is still 5, but i expected 8. Am I missing something?
Tags (comma-separated)
Save Edits
Cancel