public void TestLastIndexOf2() { CopyOnWriteArrayList <Object> full = PopulatedArray(3); full.Add(one); full.Add(three); Assert.AreEqual(3, full.LastIndexOf(one, 4)); Assert.AreEqual(-1, full.LastIndexOf(three, 3)); }
public int LastIndexOf(E o) { SubListReadData b = read; int ind = CopyOnWriteArrayList <E> .LastIndexOf(o, b.Data, start, b.Size) - start; return(ind < 0 ? -1 : ind); }