Closed OuterHeaven07 closed 1 year ago
Hi @OuterHeaven07,
out
is a property of host variables. To call method1
, you must first create a host variable of type string[]
. You can use an initial dummy value to avoid having to provide an explicit type argument when invoking newVar
:
const initialDummyValue = host.newArr(System.String, 0);
const arrayVar = host.newVar(initialDummyValue);
method1(arrayVar.out);
System.Console.WriteLine(System.String.Join(', ', arrayVar /* or arrayVar.value */));
Good luck!
Thank you very much. That was exactly what I needed
Hi @ClearScriptLib
I have a problem with the keyword out and .NET arrays. The array object itself does not seem to have an .out method implemented
here is a simple example
Basically the out parameter works with single variables, but unfortunately I can't get it to work with arrays.
Thanks for the support