Method AddRange
AddRange(IEnumerable<T>)
Adds the elements of the specified IEnumerable<T> to the end of the collection.
void AddRange(IEnumerable<T> collection)
Parameters
collection
IEnumerable<T>The IEnumerable<T> whose elements should be added to the end of the collection. The value itself cannot be
null
, but it can contain elements that arenull
, if typeT
is a reference type.
Remarks
The order of the elements in the IEnumerable<T> is preserved in the collection.
Exceptions
- NullReferenceException
collection
isnull
.