Yes it returns a copy. However as I used a "for" loop I got the updated copy of the list for every iteration of the loop. Hence the list has changed for every iteration and the indices didn't match anymore to the updated list.
I changed the code to use a "foreach" loop. It's now the same code as yours, only added checks against null references.
Last edited by 41Sqn_Banks; 12-18-2011 at 11:45 AM.
|