CollectionExtensions.

AddRange<T>(ICollection<T>, IEnumerable<T>) Method

Summary

Adds the elements of the specified collection to the end of the System.Collections.Generic.ICollection`1.

Syntax

public static void AddRange<T>(this ICollection<T> destination, IEnumerable<T> collection)

Type Parameters

Name Description
T The type of elements in the collection.

Parameters

Name Type Description
destination ICollection<T> The System.Collections.Generic.ICollection`1 to add items to.
collection IEnumerable<T> The collection whose elements should be added to the end of the destination. It can contain elements that are , if type T is a reference type.

Return Value

Type Description
void