Hello,

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

Thanks.

Re: Difference between ArrayList and List<object> ? by Nicolas

Nicolas
Fri Oct 20 05:57:54 CDT 2006

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.
>



Re: Difference between ArrayList and List<object> ? by DavidAnton

DavidAnton
Fri Oct 20 09:24:01 CDT 2006

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.
--
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


"Nicolas Guinet" wrote:

> 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.
> >
>
>
>

Re: Difference between ArrayList and List<object> ? by modosansreves

modosansreves
Wed Nov 29 11:17:26 CST 2006

Nicolas Guinet =ED=E0=EF=E8=F1=E0=E2:
> 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
>
> Regards
> Nicolas Guinet
>
> "Murat Ozgur" <muratozgur@gmail.com> a ecrit 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.
> >