Showing results for 
Search instead for 
Did you mean: 

How to create a jagged array int[][] for a .net function?



I've got to call a function from a C# library which has a function parameter of the type int[][].

Up to now I could not find a way to create such an object in LabVIEW so that it is accepted.



public MyClass(int[][] parameter)


Is there a way in LabVIEW to create a jagged array?

Have a nice day

0 Kudos
Message 1 of 4

Hello Michael,


unfortunately LabVIEW does not support arrays of arrays. Therefore, you'll not be able to use a jagged C# array directly. My knowledge of C# is limited but would it be possible to split the arrays before passing to LabVIEW using a wrapper?


Kind regards


Andreas Gareis
Staff Technical Support Engineer, NI Germany
Certified LabVIEW Developer & TestStand Architect
0 Kudos
Message 2 of 4

Hi Andreas,

what I did now was to create a factory class in C# for which a have a function


which is called several times from LabVIEW and creates within C# the jagged array.

Then I call the 

createObject() function which internally passes the now hidden jagged array to the constructor of the class and then returns the object which I can use in LabVEW. It is a workaround which is not very pretty - but it works.

Have a nice day


0 Kudos
Message 3 of 4

If it works it's pretty. Smiley Wink


0 Kudos
Message 4 of 4