问题
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