Wednesday, February 22, 2012

passing an array from vbscript to .net

.net < 4.0 does not support passing an array to its COM visible method by reference.

So, if there is a .net method in an object:
void f( object ary );

from VBscript it has to be called this way:

dim aa(1) : a(0)=1 : a(1)=2
obj.f( (aa) )

Note the extra parentheses around the array variable!

1 comment:

  1. how to passing array. right here, your post on array concept is really good.
    Ecommerce Web Site Design