Article View: borland.public.csharpbuilder.language.csharp
Article #694Re: ArrayList inside ArrayList clone problem
From: Joanna Carter (TeamB)
Date: Mon, 01 Nov 2004 08:07
Date: Mon, 01 Nov 2004 08:07
18 lines
1486 bytes
1486 bytes
"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:
<4185ef42$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4185e412@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,79070386737afa4f X-Google-Attributes: gid1efe35,public X-Google-Language: ENGLISH,ASCII From: "Joanna Carter \(TeamB\)" <joannac@btinternetxx.com> Newsgroups: borland.public.csharpbuilder.language.csharp References: <4185e412@newsgroups.borland.com> Subject: Re: ArrayList inside ArrayList clone problem Date: Mon, 1 Nov 2004 08:07:52 -0000 Lines: 20 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 81.152.49.87 Message-ID: <4185ef42$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1099296578 81.152.49.87 (1 Nov 2004 00:09:38 -0700) X-Authenticated-User: jcarter Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail