Show / Hide Table of Contents

Block.GetTransaction Method (int)

Returns the transaction specified in the current block by index.

Namespace: Neo.SmartContract.Framework.Services.Neo

Assembly: Neo.SmartContract.Framework

Syntax

public extern Neo.SmartContract.Framework.Services.Neo.Transaction GetTransaction(int index)

Parameters: the index of the transaction in the block as an integer.

Return Value: Transaction as a Transaction Type.

Example

public class Contract1: SmartContract
{
     public static void Main()
     {
         Block block = Blockchain.GetBlock(997027);
         Transaction tx = block.GetTransaction(0);
     }
}

Back