Show / Hide Table of Contents

Blockchain.GetBlock Method (uint)

Returns a block from the blockchain given a block height.

Namespace: Neo.SmartContract.Framework.Services.Neo

Assembly: Neo.SmartContract.Framework

Syntax

public static extern Neo.SmartContract.Framework.Services.Neo.Block GetBlock(uint height)

Parameters: Block height (block index) as an unsigned integer.

Return Value: Block .

Example

public class Contract1: SmartContract
{
     public static void Main()
     {
         Block bl = Blockchain.GetBlock(997027);
     }
}

Back