public override int LastIndexOf(object value, int startIndex, int count)
{
if (startIndex < 0)
{
ThrowNewArgumentOutOfRangeException ("startIndex", startIndex, "< 0");
}
if (count < 0)
{
ThrowNewArgumentOutOfRangeException ("count", count, "count is negative.");
}
if (startIndex - count + 1 < 0)
{
ThrowNewArgumentOutOfRangeException ("count", count, "count is too large.");
}
if (value == null)
{
for (int i = startIndex; i > startIndex - count; i--)
{
if (m_Adaptee[i] == null)
{
return i;
}
}
}
else
{
for (int i = startIndex; i > startIndex - count; i--)
{
if (value.Equals(m_Adaptee[i]))
{
return i;
}
}
}
return -1;
}