简体   繁体   中英

How do I run this smart contract function using nethereum to return a result?

I followed a great article online to create a smart contract with CRUD operations.

This is the function I can't get working:

function getUserAtIndex(uint index)
    public
    constant
    returns(bytes32 userKey)
  {
    return userIndex[index];
  }

I've deployed the contract and can get the function using:

  var getUserAtIndex = contract.GetFunction("getUserAtIndex");

I want to know how I can use this to get the user details at that index by using that function?

Thank You.

像这样吗

var result = getUserAtIndex.CallAsync<byte[]>(123);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM