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 / .NET Framework / New Users / November 2006

Tip: Looking for answers? Try searching our database.

Difference between ArrayList and List<object> ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Murat  Ozgur - 20 Oct 2006 09:23 GMT
Hello,

 Is there any difference between ArrayList and List<object> ? Which
one should I use ?

Thanks.
Nicolas Guinet - 20 Oct 2006 11:57 GMT
ArrayList (donet 1.1) is obsolete in dotnet 2.0
You must use List<T>
   more performant than ArrayList
   access to element is done in constant time

LinkedList<T> : time to access an element depend of the number of elements
but add is done in constant time

Regards
Nicolas Guinet

"Murat Ozgur" <muratozgur@gmail.com> a écrit dans le message de news:
1161332607.659706.187780@m7g2000cwm.googlegroups.com...
> Hello,
>
>  Is there any difference between ArrayList and List<object> ? Which
> one should I use ?
>
> Thanks.
David Anton - 20 Oct 2006 15:24 GMT
ArrayList is not obsolete in .NET 2, but it is nearly always a poor choice.
List<T> is a superior alternative since you can specify exactly what your
list contains and not have to cast back from object when reading from the
list.
Signature

David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C#/VB to C++ converter
Instant Python: VB to Python converter

> ArrayList (donet 1.1) is obsolete in dotnet 2.0
> You must use List<T>
[quoted text clipped - 15 lines]
> >
> > Thanks.
modosansreves@gmail.com - 29 Nov 2006 17:17 GMT
Nicolas Guinet написав:
> ArrayList (donet 1.1) is obsolete in dotnet 2.0
> You must use List<T>
>     more performant than ArrayList
>     access to element is done in constant time

In any container with O(n) elements the most we can have is the
O(log(n)) access time.

> LinkedList<T> : time to access an element depend of the number of elements
> but add is done in constant time
[quoted text clipped - 10 lines]
> >
> > Thanks.

Rate this thread:







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.