How can I manipulate a VB6 collection in .NET?

I am currently developing an interface for .NET software that will be consumed by COM objects, in particular VB6.

While I found several pages from Microsoft detailing how to make a COM-compatible interface, I’m currently disconnecting from using collections during development: I would like to be able to use the standard VB6 collection object in a .NET program like this Thus, I could specify in the interface such a collection as an argument, or as a return type that simplifies the work required for clients to use the interface.

Thanks in advance.

Edit: I am not going to use the VB6 collection in the .NET "real work" .NET program. I converted the VB6 collections as soon as possible and calling other methods using the corresponding .NET collections.

+3
vb6 com-interop
source share
1 answer

You cannot use a type such as a Collection Object from Visual Basic in .NET.
Instead, you should try to find an equivalent class in the System.Collections namespace that best suits your needs. For some recommendations, see the following article:

+2
source share

All Articles