public override int IndexOf(Object value, int startIndex, int count)
{
if (startIndex < 0 || startIndex > Count) throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_Index);
if (count < 0 || startIndex > Count - count) throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count);
Contract.EndContractBlock();
int endIndex = startIndex + count;
if (value == null)
{
for (int i = startIndex; i < endIndex; i++)
if (_list[i] == null)
return i;
return -1;
}
else
{
for (int i = startIndex; i < endIndex; i++)
if (_list[i] != null && _list[i].Equals(value))
return i;
return -1;
}
}