public virtual int LastIndexOf(Object value, int startIndex, int count)
{
if (Count != 0 && (startIndex < 0 || count < 0))
throw new ArgumentOutOfRangeException(startIndex < 0 ? nameof(startIndex) : nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum);
Contract.Ensures(Contract.Result<int>() < Count);
Contract.EndContractBlock();
if (_size == 0) // Special case for an empty list
return -1;
if (startIndex >= _size || count > startIndex + 1)
throw new ArgumentOutOfRangeException(startIndex >= _size ? nameof(startIndex) : nameof(count), SR.ArgumentOutOfRange_BiggerThanCollection);
return Array.LastIndexOf((Array)_items, value, startIndex, count);
}