Gets the index of an object in an array.
The index of the object in the array. If not found, -1 is returned.
This function performs a linear scan of the array to find the object.
object myObject = new object();
object[] objects = new object[] { 0, 1, myObject, 3, 4 };
int index = MainUtil.IndexOf(myObject, objects); // 2
MainUtil Class | Sitecore Namespace