Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 271
  • Last Modified:

collection class of vb6 in .net?

Is there a replacement of the collection class in .net? any reference?

1 Solution
You could use a HashTable.
It's located in the System.Collections namespace.
Alternatively, there is the ArrayList from the same namespace.
There are quite a few alternatives as mentioned above
but it would depend exactly on
Why you want a replacement ??
What extra features you want ??

Mike TomlinsonMiddle School Assistant TeacherCommented:
The old Collection class from VB6 is still in VB.Net and you can use it in exactly the same way as you did before:

    Dim c As New Collection
    c.Add("value", "key")

I agree with arif_eqbal...if you need a replacement, then what are your requirements.  None of the collection classes that come with .Net work quite like the Collection class did:

    The Collection class allows you to retrieve by Index or Key.
    The ArrayList only allows access by Index.
    The HashTable and SortedList only allow access by Key.

Hi, Idle_Mind

Even I was tempted earlier to tell him that the Collection Class is still available and pretty much the same

But when I re-read his question I thought he knows its there but does not want to use them. That's why I wanted to know WHY, What extra he wants


Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now