Reputation: 109
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.
Upvotes: 0
Views: 436
Reputation: 5626
double[][] positions = new double[size1][];
Edit: Better yet, try this:
double[,] positions = new double[size1, size2];
http://msdn.microsoft.com/en-us/library/2yd9wwz4(v=vs.100).aspx
Edit2: Doing Arrays - C# shows the difference between jagged arrays ([][]) and regular two-dimensional arrays ([,]).
Upvotes: 4