/// <summary> /// Gets the index of the key in the array. /// </summary> /// <param name="key">The key to search for.</param> /// <returns>The index of the key if found; -1 otherwise.</returns> private int IndexOfObject(object key) { Util.EquivPred ep = Util.GetEquivPred(key); for (int i = 0; i < _array.Length; i += 2) { if (ep(key, _array[i])) { return(i); } } return(-1); }