|
-
Sep 22nd, 2000, 01:22 AM
#1
Thread Starter
Lively Member
Hello,
Can anyone tell me what is collection
and where we need to use this collection
and how to use this collection object
bye
-
Sep 22nd, 2000, 03:25 AM
#2
A collection is, to use the technical description, a form of linked list. You can use them in place of arrays if you want. You get a lot more functionality (like exists and clear methods, at the expense of speed. Generally, collections are excellent for holding lists of complex object (classes and the like). Well worth exploring. Look up the MSDN to see how they work.
Also, the Collecgtion object in VB is a bit slow and dodgy, and has a number of limitations, but there is an excellent freeware one called SpiderEye Flexbag. You can get it at http://www.spidereye.com.au/software/flexbag It works the same as a normal VB collection, with a heap of extra proepries, and is much faster
- gaffa
-
Sep 22nd, 2000, 04:00 AM
#3
I tend to use collections quite abit, but I never knew about its poor performance. What actually causes this performance drag, how much slower is it?
Sunny
-
Sep 22nd, 2000, 05:04 AM
#4
Collections are slower cos they are objects in themselves. How much slower? Well, for a collection of a few dozen items, it probably wouldn't be noticable, but try dumping 100,000 items into an array, a VB collection and the Flexbag and have a look. The array will be fastest for most actions, but more of a pain to use.
I've seen a comparison of the speeds somewhere, but I can't for the life of me remember where it was. Sorry.
- gaffa
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|