When you get a structure, it is always by value. The structure will be copied, you will not receive a link to it.
The difference is that you can access sctruct directly in the array, but not in the list. When you change a property in an array structure, you access the property directly, but in order to do the same with the list, you must get the structure, set the property, and then save the structure in the list:
FloatPoint f = points2[0]; fx = 0; points2[0] = f;
Earlier versions of the compiler will allow you to write the code that you have, but for a list, it will generate code similar to this:
FloatPoint f = points2[0]; fx = 0;
those. he will read the structure, change it and quietly throw away the changed structure. The compiler has been modified to give an error in this case.
Guffa source share