Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / September 2005

Tip: Looking for answers? Try searching our database.

Compare Two ArrayList

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gomathi - 27 Sep 2005 12:57 GMT
hi all,

In my windows application(C#) , i have two arraylists.
I want to compare those two arraylist.
Is there any way for that?

Thanks in advance.

Gomathi
Oliver Sturm - 28 Sep 2005 10:39 GMT
>In my windows application(C#) , i have two arraylists.
>I want to compare those two arraylist.
>Is there any way for that?

There's no automatic function that does this for you, as far as I know.  
To do this properly yourself, you'll need a three (or is it only two?)
step process:

 1. Compare the sizes
 2. and 3. Iterate over the lists and compare the objects in them one by one, thereby effectively comparing the order of the lists and the exact content.

               Oliver Sturm
Signature

Expert programming and consulting services available
See http://www.sturmnet.org (try /blog as well)

Gomathi - 28 Sep 2005 11:00 GMT
hi,

Thanks for your reply.
I feel that this process is an expensive one.Sothat only i asked for any
other solution.
Once again thanks for that.

Gomathi

>>In my windows application(C#) , i have two arraylists.
>>I want to compare those two arraylist.
[quoted text clipped - 10 lines]
>
>                Oliver Sturm
Jon Skeet [C# MVP] - 28 Sep 2005 11:40 GMT
> Thanks for your reply.
> I feel that this process is an expensive one.

Do you have any evidence for that feeling though? It's absolutely
crucial for performance work that you find out just how much something
is costing before you try to improve it. Otherwise, you don't know
whether you've made an improvement or even whether you *need* to
improve it.

Signature

Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet   Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.