日期:2014-05-18  浏览次数:21023 次

C#调用C++的dll接口的参数类型问题
void Forfit( int methods, double (& arrInput)[32], double (& arrParamIn)[4], double (& arrOutput)[32], double (& arrParamOut)[4] );
调用c++dll,里面的double(& arrInput)[32],C#中怎么写?
ref out直接提示错误,


------解决方案--------------------
C# code

Ilist<double>arrInput= new List<double>();
Ilist<double>arrParamIn= new List<double>();
Ilist<double>arrOutput= new List<double>();
Ilist<double>arrParamOut= new List<double>();

void Forfit( int methods,IList<double> arrInput , IList<double> arrParamIn, IList<double> arrOutput, IList<double> arrParamOut);