public virtual int BinarySearch(int index, int count, Object value, IComparer comparer)
{
if (index < 0)
throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_NeedNonNegNum);
if (count < 0)
throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum);
if (_size - index < count)
throw new ArgumentException(SR.Argument_InvalidOffLen);
Contract.Ensures(Contract.Result<int>() < Count);
Contract.Ensures(Contract.Result<int>() < index + count);
Contract.EndContractBlock();
return Array.BinarySearch((Array)_items, index, count, value, comparer);
}