T
tshad
How do you easily make a copy of an arraylist?
If you do:
arrayList2 = arrayList1
You get a pointer so that if you clear arrayList2 (arrayList2.Clear) -
arrayList1 is also cleared.
I want to create a copy of the arrayList, which I can do looping through the
arrayList1 and adding to arrayList2, but is there an easier way to do this?
Thanks,
Tom
If you do:
arrayList2 = arrayList1
You get a pointer so that if you clear arrayList2 (arrayList2.Clear) -
arrayList1 is also cleared.
I want to create a copy of the arrayList, which I can do looping through the
arrayList1 and adding to arrayList2, but is there an easier way to do this?
Thanks,
Tom