How can I call a method (of a COM object) that returns an array of objects from VBScript
See the question and my original answer on StackOverflowYou need to return a class that's ComVisible (and enumerable), for example, this:
public Array Bars()
{
return bars;
}
or an ArrayList, something like this:
public ArrayList Bars()
{
ArrayList list = new ArrayList();
// etc...
return list;
}
or if you don't like ArrayList, something like this:
public BarList Bars()
{
BarList list = new BarList();
// etc...
return list;
}
[ComVisible(true)]
public class BarList : List<Bar>
{
}