"Error:Array value expected for type"将字符串的 2darray 作为参数 Nethereum 传递时



我使用ganache松露套件作为本地区块链来测试我的智能合约。这是我的solidity函数,我可以添加一个二维字符串数组并填充一个映射(string =>字符串)与它:

function AddSignature(string[][] memory _signature) public{
for ( uint i = 0 ; i < _signature.length; i++ ) {

require(!_studentExists[_signature[i][0]]);
signatures[_signature[i][0]] = _signature[i][1];
_studentExists[_signature[i][0]]=true;
}  
}

这是我的程序。cs代码,我试图通过。net与AddSignature函数通信:

class Program
{
static void Main(string[] args)
{
//The URL endpoint for the blockchain network.
string url = "HTTP://127.0.0.1:7545";
//The contract address.
string address =
"0x4373671d1fC2d795A7c066E27CAB732933343b15";
//The ABI for the contract.
string ABI =
@"..."

Web3 web3 =  new Web3(url);
Contract CryptoD =  web3.Eth.GetContract(ABI, address);
Console.WriteLine("Enter your address: ");
string addressStudent = Console.ReadLine(); 
Console.WriteLine("Enter your signature: ");
string signature = Console.ReadLine(); ;
string[,] duo = new string[, ]
{
{ addressStudent, signature }
};
try
{
Task<string> mintFunction = CryptoD.GetFunction("AddSignature").
SendTransactionAsync(from: "0xe801bF0abd0eC70d77a954AF901D4AF747c0CfF2BALANCE",duo);
mintFunction.Wait();
Console.WriteLine("signature added!");
}
catch (Exception e)
{
Console.WriteLine("Error: {0}", e.Message);
}
}

}

我通过传递2d数组而不是1d数组作为参数解决了这个错误