0

I am trying to use a dll in a c# windows application. this dll is expecting one double[][] parameter( more than 10000 values) and another double[] parameter.

public static double[] CalcResults(double[][] Positions, double[] Values)

I am not quite sure how to declare this variable in the c# class. Appreciate your help.

4

1 回答 1

4
double[][] positions = new double[size1][];

编辑:更好的是,试试这个:

double[,] positions = new double[size1, size2];

http://msdn.microsoft.com/en-us/library/2yd9wwz4(v=vs.100).aspx

Edit2 : Doing Arrays - C#显示了锯齿状数组 ([][]) 和常规二维数组 ([,]) 之间的区别。

于 2012-04-26T18:39:47.593 回答