ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_ReadOnlyCollection);
}
- if (index < 0 || index >= items.Count)
+ if ((uint)index >= (uint)items.Count)
{
ThrowHelper.ThrowArgumentOutOfRange_IndexException();
}
ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_ReadOnlyCollection);
}
- if (index < 0 || index > items.Count)
+ if ((uint)index > (uint)items.Count)
{
- ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_ListInsert);
+ ThrowHelper.ThrowArgumentOutOfRange_IndexException();
}
InsertItem(index, item);
if (collection == null)
{
- ThrowHelper.ThrowArgumentNullException(ExceptionArgument.list);
+ ThrowHelper.ThrowArgumentNullException(ExceptionArgument.collection);
}
if ((uint)index > (uint)items.Count)
{
- ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_ListInsert);
+ ThrowHelper.ThrowArgumentOutOfRange_IndexException();
}
InsertItemsRange(index, collection);
if (collection == null)
{
- ThrowHelper.ThrowArgumentNullException(ExceptionArgument.list);
+ ThrowHelper.ThrowArgumentNullException(ExceptionArgument.collection);
}
ReplaceItemsRange(index, count, collection);
ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_ReadOnlyCollection);
}
- if (index < 0 || index >= items.Count)
+ if ((uint)index >= (uint)items.Count)
{
ThrowHelper.ThrowArgumentOutOfRange_IndexException();
}