public void TestIndexOf2() { CopyOnWriteArrayList <Object> full = PopulatedArray(3); Assert.AreEqual(1, full.IndexOf(1, 0)); Assert.AreEqual(-1, full.IndexOf(1, 2)); }
public int IndexOf(E o) { SubListReadData b = read; int ind = CopyOnWriteArrayList <E> .IndexOf(o, b.Data, start, b.Size) - start; return(ind < 0 ? -1 : ind); }