When the function has two arrays to return

  • Thread starter rodri rodri via DotNetMonster.com
  • 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.
 
R

rodri rodri via DotNetMonster.com

I have found the answer:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top