Access VBA equivalent to a C# List<T>

不羁岁月 提交于 2019-12-18 03:45:36

问题


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?


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/3497982/access-vba-equivalent-to-a-c-sharp-listt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!