Version
Show / Hide Table of Contents

Block.GetTransactionCount Method ()

Returns the number of transactions in the current block.

Namespace: Neo.SmartContract.Framework.Services.Neo

Assembly: Neo.SmartContract.Framework

Syntax

public extern int GetTransactionCount()

Return value: Number of transactions as an integer.

Example

public class Contract1: SmartContract
{
     public static void Main()
     {
         Block block = Blockchain.GetBlock(997027);
         Int txCount = block.GetTransactionCount();
     }
}

Back