protected virtual void InsertItemsRange(int index, IEnumerable<T> collection)
{
- if (collection == null)
+ if (items.IsReadOnly)
{
- ThrowHelper.ThrowArgumentNullException(ExceptionArgument.list);
+ ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_ReadOnlyCollection);
}
- if (items.IsReadOnly)
+ if (collection == null)
{
- ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_ReadOnlyCollection);
+ ThrowHelper.ThrowArgumentNullException(ExceptionArgument.list);
}
if ((uint)index > (uint)items.Count)