Re: arraylist copy
- From: "Joseph MCAD" <anonymous@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 8 Apr 2005 14:42:18 -0700
April 8, 2005
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!
Joseph MCAD
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@xxxxxx> wrote in message
news:OlmslNGPFHA.580@xxxxxxxxxxxxxxxxxxxxxxx
> "Joseph MCAD" <anonymous@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb:
>> If you use the .Clone method then both arraylists will still point to the
>> same objects. HTH
>
> That is not true. 'Clone' will create a shallow copy of the arraylist:
>
> \\\
> Dim a1 As New ArrayList
> Dim a2 As ArrayList = a1.Clone()
> MsgBox(CStr(a1 Is a2))
> ///
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://classicvb.org/petition/>
.
- Follow-Ups:
- Re: arraylist copy
- From: Cor Ligthert
- Re: arraylist copy
- From: Herfried K. Wagner [MVP]
- Re: arraylist copy
- References:
- arraylist copy
- From: Sam
- Re: arraylist copy
- From: Joseph MCAD
- Re: arraylist copy
- From: Herfried K. Wagner [MVP]
- arraylist copy
- Prev by Date: Re: Please do NOT sign the VB.COM petition
- Next by Date: Re: Dropdowns behaving differently on different systems.
- Previous by thread: Re: arraylist copy
- Next by thread: Re: arraylist copy
- Index(es):
Relevant Pages
|
Loading