That is a followup from my previous question, but you don't need to read it to understand that one.
I'm designing an interface in .NET that would be consumed from COM applications (mainly VB6, but Visual C++ 6 is also a possibility) and I would like to use Collection types as argument and return types for the methods in the interface.
Questions:
What happens to the VB6 built-in collection types (arrays, collections, dictionaries) when they go through interop? My current guess is that:
System.Array
Microsoft.VisualBasic.Collection
System.Collections.Hashtable
Is that correct?
IEnumerable
, ICollection
, IList
, IDictionary
? Would I be able to do a For Each in VB6 to iterate over these interfaces? Should I use the generic or non-generic variants of the interfaces?I think this article over on Codeproject will cover most of your questions on interop
https://web.archive.org/web/20181009002630/https://www.codeproject.com/Articles/990/Understanding-Classic-COM-Interoperability-With-NE
-http://www.codeproject.com/KB/COM/cominterop.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With