VBA Equivalent to List<T> in C# [duplicate]

孤人 提交于 2019-12-12 04:52:36

问题


Possible Duplicate:
VB6 equivalent to a List<T>

Duplicate of:

Access VBA equivalent to a List<T>

I posted this question with the wrong information before, so I am reposting it in the hopes of getting a correct answer. 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:


Firstly, COM has no concept of generics; so you won't have any luck trying to make something out of a List<string[]>.

Why don't you just add an overload to your C# method to accept a string[][] (a jagged array of strings)? That should be doable from VBA, unless I'm mistaken.

I apologize if this answer is way off the mark; I don't have MS Office installed on this machine and am basically answering based on my limited knowledge of VBA and COM interop. But I thought the jagged array suggestion might at least nudge you in the right direction.



来源:https://stackoverflow.com/questions/3516325/vba-equivalent-to-listt-in-c-sharp

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