CollectionExtensions.AddRange<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds the elements of the specified collection to the existing collection.
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static void AddRange(System::Collections::ObjectModel::Collection<T> ^ collectionToUpdate, System::Collections::Generic::IEnumerable<T> ^ collection);
public static void AddRange<T> (this System.Collections.ObjectModel.Collection<T> collectionToUpdate, System.Collections.Generic.IEnumerable<T> collection);
static member AddRange : System.Collections.ObjectModel.Collection<'T> * seq<'T> -> unit
<Extension()>
Public Sub AddRange(Of T) (collectionToUpdate As Collection(Of T), collection As IEnumerable(Of T))
Type Parameters
- T
Type of item in the collection
Parameters
- collectionToUpdate
- Collection<T>
The existing collection.
- collection
- IEnumerable<T>
The collection of items to add.
Exceptions
Thrown when the collection parameter is null.