My Current Favorite Class... ArrayList
When ever I start a new project I select the custom Library project with a reference to VBCorLib already selected. I don't even give it a second thought. I just expect the functionality to be there. So with all of that functionality available to me what do I usually use first?
Well, when creating a class that contains items I reach for the ArrayList first. Why? I know I could use the Collection class or an array. Do I just feel safer with an ArrayList? Maybe it's because I know how it works and it's about as effecient as can be with indexed lookups? Or maybe it's because it has all sorts of list manipulation capabilities that I feel like I won't have to change the type of collection or add additional functionality to manage a different collection type later on in the coding process.
In my current project I store objects. It's easy enough to store them in any type of container, but I needed one functionality and didn't want to have to code too much. I needed to be able to sort the objects in the list. Immediately the Collection class is out. Oh sure you could sort it using the hardest method possible. I could easily sort an array of objects using VBCorLib. But, when it comes down to it, I don't like having to manage an array directly. So, unless there is a pressing reason for the quickest access to the objects in a list, I choose an ArrayList and provide a custom IComparer object when sorting the items. What could be easier?
I use other classes in VBCorLib, but my first class is usually the ArrayList allowing for easy manipulation of list data.
-Kelly
Well, when creating a class that contains items I reach for the ArrayList first. Why? I know I could use the Collection class or an array. Do I just feel safer with an ArrayList? Maybe it's because I know how it works and it's about as effecient as can be with indexed lookups? Or maybe it's because it has all sorts of list manipulation capabilities that I feel like I won't have to change the type of collection or add additional functionality to manage a different collection type later on in the coding process.
In my current project I store objects. It's easy enough to store them in any type of container, but I needed one functionality and didn't want to have to code too much. I needed to be able to sort the objects in the list. Immediately the Collection class is out. Oh sure you could sort it using the hardest method possible. I could easily sort an array of objects using VBCorLib. But, when it comes down to it, I don't like having to manage an array directly. So, unless there is a pressing reason for the quickest access to the objects in a list, I choose an ArrayList and provide a custom IComparer object when sorting the items. What could be easier?
I use other classes in VBCorLib, but my first class is usually the ArrayList allowing for easy manipulation of list data.
-Kelly
2 Comments:
I'm very pleased you have VBCorLib published on the Internet.
I'm a 10+ year VB6 developer who is right now working on a .Net platform.
Today, is my great challenging day. Recoding
a legacy app which is was written in VB6.
I'm glad I found your site. I'm pretty much enjoy using your ArrayList/ SortedList as I much enjoyed it
from Microsoft .Net.
You're genius!!
Thanks a lot.
Shin .K. // Thailand.
By Anonymous, at 3/03/2009 6:45 AM
Yes if the truth be known, in some moments I can say that I agree with you, but you may be making allowance for other options.
to the article there is still a without question as you did in the go over like a lead balloon a fall in love with issue of this request www.google.com/ie?as_q=dvd x studios video x converter 2.0.1.97 ?
I noticed the catch-phrase you have in the offing not used. Or you profit by the pitch-dark methods of promotion of the resource. I have a week and do necheg
By Anonymous, at 2/08/2010 1:05 AM
Post a Comment
<< Home