---
title: IndexOf(void*)
product: Unity Editor
version: '6000.7'
latest_version: '7000.0'
status: This page documents version 6000.7. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/unsafeptrlist1/parallelreader/indexof
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/collections/lowlevel/unsafe/unsafeptrlist1/parallelreader/indexof.md
last_updated: 2026-09-14
generated_at: 2026-11-18T07:50:05.229Z
locale: en-us
---

# IndexOf(void*)

> Returns the index of the first occurrence of a specific pointer in the list.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections.LowLevel.Unsafe](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe.md)
* **Assembly:** UnityEngine.ManagedKernelModule

```csharp
public int IndexOf(void* ptr)
```

### Parameters

**** (\[void\*]\(https\://learn.microsoft.com/dotnet/api/system.void)): The pointer to search for in the list.

### Returns

| Type                                                       | Description                                                                                  |
| ---------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the first occurrence of the pointer. Returns -1 if it is not found in the list. |
