ArrayList vs CollectionBase

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

Can anyone help me in deciding between ArrayList and CollectionBase.
I know that CollectionBase is an Abstarct Class unlike AarryList .
Are the any benifits/Advantages using CollectionBase rather than Arraylist?
 
nLella said:
Can anyone help me in deciding between ArrayList and CollectionBase.
I know that CollectionBase is an Abstarct Class unlike AarryList .
Are the any benifits/Advantages using CollectionBase rather than Arraylist?

It's typically used to create strongly typed lists. If you need a
strongly typed list, use CollectionBase, otherwise use ArrayList.
 
Thank you;

I am using strong typed ones, so I believe I have to use CollectionBase.

Is ther any other difference between the two; I mean like performance etc.?
 
nLella said:
I am using strong typed ones, so I believe I have to use CollectionBase.

Is ther any other difference between the two; I mean like performance etc.?

I shouldn't think there'd be any significant performance difference. I
doubt that many apps are bottlenecked by collections anyway.

One difference which might be relevant to you is that CollectionBase
doesn't have a built-in sorting mechanism as far as I can tell, whereas
ArrayList has a Sort method.
 
If you need a sorted list, there is a strongly typed sorted list class as
well.

Mike Ober.
 
Back
Top