CLocation is a C++CLI
value class (would be a
struct in C#) with public members
List<CLocation>^ listloc = gcnew List<CLocation>;
listloc->Add (CLocation (1,2,3));
listloc.x = 5; // FAILS, '5' is not stored.
array<CLocation>^ aloc = gcnew array<CLocation>(1);
aloc = CLocation (1,2,3);
aloc.x = 5; // WORKS
5 not saved in the member of the object in the list, while it is perfectly saved in the member of the object of the array?
Does list access return a copy of the object as Marc Gravell wrote in In C#, are the values in a List<struct> boxed? ?