# LastIndexOf<T>(T[], T)

> Index of the last element with value value.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

## LastIndexOf\<T>(\`\<>\[], T)

```csharp
public static int LastIndexOf<T>(T[] array, T value)
```

### Parameters

**** (\[\<T>\[]]\(./)): **** (T):&#x20;

### Returns

| Type                                                       | Description                                                  |
| ---------------------------------------------------------- | ------------------------------------------------------------ |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The zero-based index of the element, if found; otherwise -1. |
