> ## 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.

# LayoutBlocks オブジェクトの IndexOf メソッド

> ABBYY FineReader Engine API の LayoutBlocks オブジェクトの IndexOf メソッド — コレクション内の Block のインデックスを返します。Block が存在しない場合は -1 を返します。

このメソッドは、コレクション内のブロックのインデックスを返します。コレクション内に該当するブロックが存在しない場合は、-1 が返されます。

<div id="syntax">
  ## 構文
</div>

<div id="c">
  ### C++
</div>

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

### C\#

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

<div id="visual-basic-net">
  ### Visual Basic .NET
</div>

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

<div id="parameters">
  ## パラメーター
</div>

Block

\[in] レイアウト内で検索する対象のブロックを表す [Block](/ja/fine-reader/engine/api-reference/layout-related-objects/block) オブジェクトを参照します。

Result

\[out, retval] このパラメーターには、指定したページに対応する要素のインデックスが格納されます。

<div id="return-values">
  ## 戻り値
</div>

このメソッド固有の戻り値はありません。返されるのは、[ABBYY FineReader Engine 関数の標準的な戻り値](/ja/fine-reader/engine/api-reference/return-codes)です。

<div id="see-also">
  ## 関連項目
</div>

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