I've just decided to add C# to my repetoire so I'm going through the language at the moment to iron out the differences between in and c++. At the moment I just need to clarify the value parameter of a method with perhaps an explanation of what's actually happening at the memory level:
IntHolder first = new IntHolder();
IntHolder second = first;
Now normally I would've thought that would produce a 6 since IntHolder second = first is a reference to the same object.
IntHolder is a struct, which means value type (no referenses). Had it been a class the output would be 6.