External .net code with arrays

Monkey Forums/Monkey Programming/External .net code with arrays

andrew_r(Posted 2012) [#1]
Is it possible to link into external .net code where a method takes an array as a parameter and returns an array as a result (or a parameter - I'm flexible).

E.g. Any one of the following:

C#
int[][] DoSomething(int[][] array)
int[,] DoSomething(int[,] array)
void DoSomething(int[][] array, int[][] outArray)
void DoSomething(int[,] array, int[,] outArray)


AdamRedwoods(Posted 2012) [#2]
Import yourExternalNetFile

Extern

Class ExternNetClass
    Method ExternalNetMethod:Int[][](param:Int[][])
End

Public



Rone(Posted 2012) [#3]
That works, I use this also in my xna wrapper.

But the [,] syntax is not supported by monkey at all...so only array of array..

Extern 

Class TestItf
	Method SetTest:Void(arr:int[][])
	Method GetTest:int[][]()	
End

public 


public int[][] test;
public void SetTest(int[][] arr)	
{
	test = arr;
}
	
public int[][] GetTest()	
{
	return test;
}



andrew_r(Posted 2012) [#4]
Thank you kindly :)