Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IndexOf<T>(T[], T)

Index of first element with value value.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor

IndexOf<T>(`<>[], T)

public static int IndexOf<T>(T[] array, T value)

Parameters

array


value

T

Returns

Type

Description

intThe zero-based index of the element, if found; otherwise -1.