When the function has two arrays to return

  • Thread starter Thread starter rodri rodri via DotNetMonster.com
  • Start date Start date
R

rodri rodri via DotNetMonster.com

This function will return two values:

using namespace System::Runtime::InteropServices;

int function1([Out] int * value2);

But how can I do that with arrays?

I have tried with this, but 'array2' is returned empty:

using namespace System::Runtime::InteropServices;

int function1([Out] int array2 __gc[]) __gc[]

Does somebody know how to do it? Thanks.
 
I have found the answer:

int function1([Out] int (* array2) __gc[]) __gc[];
 
Back
Top