View Single Post
  #5  
Old 12-18-2011, 11:42 AM
41Sqn_Banks 41Sqn_Banks is offline
Approved Member
 
Join Date: Oct 2007
Posts: 644
Default

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.
Reply With Quote