C# 如何通过NETLink将可为空的十进制数从Mathematica传递到.Net

C# 如何通过NETLink将可为空的十进制数从Mathematica传递到.Net,c#,c#-4.0,.net-4.0,wolfram-mathematica,netlink,C#,C# 4.0,.net 4.0,Wolfram Mathematica,Netlink,调用带有十进制参数的方法没有问题,如下所示: //public void MyMethod(decimal d){ myWrapper@MyMethod[1.23]; //public void MyMethod(decimal? d){ // this call works myWrapper@MyMethod[Null]; 但是,我需要更改MyMethod的签名,如下所示: //public void MyMethod(decimal d){ myWrapper@MyMethod[1

调用带有十进制参数的方法没有问题,如下所示:

//public void MyMethod(decimal d){

myWrapper@MyMethod[1.23];
//public void MyMethod(decimal? d){
// this call works
myWrapper@MyMethod[Null];
但是,我需要更改MyMethod的签名,如下所示:

//public void MyMethod(decimal d){

myWrapper@MyMethod[1.23];
//public void MyMethod(decimal? d){
// this call works
myWrapper@MyMethod[Null];
向修改后的MyMethod传递Null有效,但传递十进制数失败:

myWrapper@MyMethod[1.2];
NET::methodargs: Improper arguments supplied for method named MyMethod
我错过了什么