I am trying to understand shared references in the best way and i’m not sure i have fully understood it.
My understanding of shared references is when i have a collection and there exists two or more references to that perticular collection in the code, if it is changed in one of those references the other’s will not be the same and generate errors, correct?
Regards
Right but partially. if contents of the collection is changed through one reference, other reference will also point to the updated contents.
Your other part says, that it will generate errors. well, it depends on logic.
Here, all the references are pointing to same object. So, if object is modified by
a1, other referencea2,a3will also see the modifies state.