πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.language.csharp
Article #695

Re: ArrayList inside ArrayList clone problem

#695
From: Pujo Aji
Date: Mon, 01 Nov 2004 09:12
29 lines
1820 bytes
thanks,

any advice instead of directly copying each element to another arrayList 
element ?

regards,
pujo aji
"Joanna Carter (TeamB)" <joannac@btinternetxx.com> wrote in message 
news:4185ef42$1@newsgroups.borland.com...
> "Pujo Aji" <ajikoe@yahoo.com> a οΏ½crit dans le message de news:
> 4185e412@newsgroups.borland.com...
>
>> //AA should not change into "world" also, but it is changed
>> Console.WriteLine(((ArrayList)AA[0])[0]);//will show "world"
>
> A shallow copy will only copy the address of the inner array and therefore
> any change to one wopy will also affect the other as the inner element of
> both still point to the same array.
>
> Joanna
>
> --
> Joanna Carter (TeamB)
>
> Consultant Software Engineer
> TeamBUG support for UK-BUG
> TeamMM support for ModelMaker
>
> 
Technical Details
Message-ID: <4185fe0b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4185e412@newsgroups.borland.com> <4185ef42$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,79070386737afa4f
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII
Reply-To: "Pujo Aji" <ajikoe@yahoo.com>
From: "Pujo Aji" <ajikoe@yahoo.com>
Newsgroups: borland.public.csharpbuilder.language.csharp
References: <4185e412@newsgroups.borland.com> <4185ef42$1@newsgroups.borland.com>
Subject: Re: ArrayList inside ArrayList clone problem
Date: Mon, 1 Nov 2004 10:12:36 +0100
Lines: 31
Organization: TU GRAZ
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 193.171.243.75
Message-ID: <4185fe0b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1099300363 193.171.243.75 (1 Nov 2004 01:12:43 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail