Tanis.Collections.Heap.IndexOf C# (CSharp) Method

IndexOf() public method

Idem IndexOf(object), but with a start index and a specified equality function
public IndexOf ( object Object, int Start, Equality AreEqual ) : int
Object object The object to locate.
Start int The index for start position.
AreEqual Equality Equality function to use for the search.
return int
		public int IndexOf(object Object, int Start, Equality AreEqual)
		{
			if ( Start<0 || Start>=FList.Count ) throw new ArgumentException("Start index must belong to [0; Count-1].");
			for (int i=Start; i<FList.Count; i++)
				if ( AreEqual(FList[i], Object) ) return i;
			return -1;
		}

Same methods

Heap::IndexOf ( object O ) : int
Heap::IndexOf ( object Object, Equality AreEqual ) : int
Heap::IndexOf ( object Object, int Start ) : int