I would like to get something similar to solidity

block.number - 1

using Nethereum


Is latest here mean the Last BlockNumber been mined? Or do I need to minus 1?

1 Answer 1

var latestBlockNumber = await web3.Eth.Blocks.GetBlockNumber.SendRequestAsync();

See the bottom example located here: https://nethereum.readthedocs.io/en/latest/Nethereum.Workbooks/docs/nethereum-gettingstarted-infura/

Which I posted above ^.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.