unity csharp find object position in array

Code Example - unity csharp find object position in array

                
                        //C# Unity finding an object in an array
int positionInArray = System.Array.IndexOf(arrayName, objectToFind);