> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IndexOf Method of the LayoutBlocks Object

This method returns the index of a block in the collection. If there is no such block in the collection, -1 is returned.

## Syntax

### C++

```cpp theme={null}
HRESULT IndexOf(
  IBlock* Block,
  int*    Result
);
```

### C\#

```csharp theme={null}
int IndexOf( IBlock Block );
```

### Visual Basic .NET

```vb theme={null}
Function IndexOf(Block As IBlock) As Integer
```

## Parameters

Block

\[in] Refers to the [Block](/fine-reader/engine/api-reference/layout-related-objects/block) object which represents the block you need to find in the layout.

Result

\[out, retval] This parameter contains the index of element which corresponds to the specified page.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FineReader Engine functions](/fine-reader/engine/api-reference/return-codes).

## See also

[LayoutBlocks](/fine-reader/engine/api-reference/layout-related-objects/layoutblocks)
