Access VBA equivalent to a C# List

2019-01-23 20:15发布

I have a COM-visible object written in C# that accepts a list of string arrays. Could I send a Collection of string arrays from Access 2000 to this object and it work? If not, then what is the best way to send multiple string arrays to my C# object from Access 2000?

2条回答
Evening l夕情丶
2楼-- · 2019-01-23 20:40

You can't marshal generics but using Collection on the VB6 side is a workable solution. Effectively convert your List to a standard collection.

Here's something that elaborates more: http://www.codeproject.com/KB/COM/netclasslistvb6.aspx?display=Print

查看更多
贪生不怕死
3楼-- · 2019-01-23 21:01

I do a lot of com add in work on VBA and vb.net - I find replacing a List (of T) in vb.net with an arraylist works very well in VBA, not all the properties expose exactly the same way in Access, but you can work around it.

查看更多
登录 后发表回答