I missed this in dotnet/coreclr#23166. Current it's defined as:
https://github.com/dotnet/coreclr/blob/b8d5b7b760f64d39e00554189ea0e5c66ed6bd62/src/System.Private.CoreLib/shared/System/Collections/ObjectModel/Collection.cs#L72
But it should be something like:
public void AddRange(IEnumerable<T> collection)
{
if (items.IsReadOnly)
{
ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_ReadOnlyCollection);
}
if (collection == null)
{
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.collection);
}
int index = items.Count;
InsertItemsRange(index, collection!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
I missed this in dotnet/coreclr#23166. Current it's defined as:
https://github.com/dotnet/coreclr/blob/b8d5b7b760f64d39e00554189ea0e5c66ed6bd62/src/System.Private.CoreLib/shared/System/Collections/ObjectModel/Collection.cs#L72
But it should be something like: