Hi all.
Today I have this beginner question.

If I create Object A of ArrayCollection for instance.

And the create Object B also Array Collection, and Make B = A (it
safes a lot of time and code, specially when the other object is a
custom one).

If I add an item to B, that item is also added to A.

Other example. I have the class Guy with properties 1stName and 2ndName.

If A is instance of Guy and B is also instance of Guy and I want it to
have the same 1stName has A is do B = A.

Problem... If I make B.2ndName = "somename"... A object 2ndName also
changes to "somename".

I don't want this!!! I only want B = A at the beginning and then I
want to be free to change be without changing A.

How to get around this?

Thanks

And sorry for this silly question!!!



Reply via email to