Re: arraylist copy
- From: "Cor Ligthert" <notmyfirstname@xxxxxxxxx>
- Date: Sat, 9 Apr 2005 09:21:15 +0200
"Joseph
> Thanks! Then what is the difference between CopyTo and Clone? MSDN
> mentioned that clone creates a shallow copy and copyto creates a deep
> copy? Thanks again!
>
A clone makes a copy of the arraylist. While an array is a reference type,
are only the references copied. Any change in a shadow will affect on the
other one as well. Except when it is by instance the removing or adding of a
reference (row), than they grew apart.
A copyto makes a copy of the values in a one dimensional array. Where when
it are objects it is in fact again a shadow of course.
A deep copy makes new copy of all the values and creates a new arraylist
arround those. For that I have never seen a method in Net. You have to do it
yourself. (In my opinion can that be complicated when it is by instance a
jagged array).
I hope this gives some idea's
Cor
.
- Follow-Ups:
- Re: arraylist copy
- From: Joseph MCAD
- Re: arraylist copy
- From: J L
- Re: arraylist copy
- References:
- arraylist copy
- From: Sam
- Re: arraylist copy
- From: Joseph MCAD
- Re: arraylist copy
- From: Herfried K. Wagner [MVP]
- Re: arraylist copy
- From: Joseph MCAD
- arraylist copy
- Prev by Date: Re: Getting reference to an ErrorProvider
- Next by Date: Re: arraylist copy
- Previous by thread: Re: arraylist copy
- Next by thread: Re: arraylist copy
- Index(es):
Relevant Pages
|