G
Guest
Hi
At one point in my application I have a single ArrayList object that I need to break up in two Arraylist objects: the beginning part up to an index, and the ending part from a certain index. I am now using ArrayList.GetRange but the documentation states that this method does not create new ArrayList objects but views into the source ArrayList object
ArrayList original
// ..
ArrayList l1 = original.GetRange( 0, count )
ArrayList l2 = original.GetRange( count, tillEndOfList )
Processing( l1 )
Processing( l2 )
Is it true that the ArrayList objects returned do not act as true independent ArrayList objects (ie that they are tied to the original)
If so then how can I make two true seperate ArrayList objects that are not tied to the original. I hope that this doesn't take up more than one line of code per ArrayList ... I'd be really disappointed
Thank you
Tom.
At one point in my application I have a single ArrayList object that I need to break up in two Arraylist objects: the beginning part up to an index, and the ending part from a certain index. I am now using ArrayList.GetRange but the documentation states that this method does not create new ArrayList objects but views into the source ArrayList object
ArrayList original
// ..
ArrayList l1 = original.GetRange( 0, count )
ArrayList l2 = original.GetRange( count, tillEndOfList )
Processing( l1 )
Processing( l2 )
Is it true that the ArrayList objects returned do not act as true independent ArrayList objects (ie that they are tied to the original)
If so then how can I make two true seperate ArrayList objects that are not tied to the original. I hope that this doesn't take up more than one line of code per ArrayList ... I'd be really disappointed
Thank you
Tom.