|
-
Jul 5th, 2000, 09:47 PM
#1
Thread Starter
New Member
I got a problem with the collection object in Visual Basic 6.
A maximum of 256 items can be added in a collection. But, if you pass this limit, no more item are add in collection, but the count property continue to expand.
Example:
Dim colTest As New Collection
Dim iCpt As integer
For iCpt = 1 To 300
colTest.Add iCpt
Next
The collection contents 256 items, but the count property is 300.
Why?
-
Jul 5th, 2000, 09:51 PM
#2
I dunno this sort of stuff but somewhere I saw this:
Code:
Dim Something As String * 32
'So why don't you try:
Dim colTest As New Collection * 2
As I said before, I dunno what this does.
-
Jul 5th, 2000, 10:38 PM
#3
Frenzied Member
It'll be a bug, VB's full of them.
If you're desperate you cuold create a wrapper class for collections, involving a collection of collections acting as one. that way you could have a maximum of 65536 items. And this time sort out the count property properly.
-
Feb 19th, 2002, 02:39 PM
#4
New Member
I just wanted to add a little something here
I thought the maximums items in a collection was 256 but it's not. The bug is when you try to look a the collection in a debug window, it only shows the 256 first items. If you try to access the other items in your code, it works well.
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
|