|
-
Jan 20th, 2004, 11:05 AM
#1
Thread Starter
Fanatic Member
VB6 Collection Classes in C#
Hi still getting my head round C# ( but it is great) trying to do something I use to use a lot in VB6 that being the Collection Class but have no idea how to achieve this via C# ( it does not even support the collection object unlike VB.Net)
Any help would be appreciated
-
Jan 20th, 2004, 12:49 PM
#2
System.Collections contains a few collections, though far too few to be really useful I say. Still, it's more than VB6 had.
I think the class that most closely resembles VB6' Collection is System.Windows.Forms.Control.ControlCollection.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 20th, 2004, 01:43 PM
#3
Depends on how you want to do "it" - do you want to use an key, or a numeric index (Hashtable and ArrayList respectively)?
-
Jul 27th, 2011, 01:26 PM
#4
New Member
Re: VB6 Collection Classes in C#
I have looked for several collection classes in C#, but none of them support the following VB Collection.Add method:
VB:
Collection.Add(item, value, before, after)
The 'before' & 'after' parameters are not supported anywhere in C# collection classes like Dictionary, Hashtable, etc.
If anyone has clue on how to support this in C#, please post some code. Much appreciated !
-
Jul 27th, 2011, 04:32 PM
#5
Re: VB6 Collection Classes in C#
You can reference the Microsoft.VisualBasic assembly and then use it directly.
However, this collection is rather eccentric compared to the standard collections in the System.Collections.Generic namespace, which most developers will recognize (List, Dictionary, etc.).
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
|