CollectionExtensionsAddRangeT Method

Adds a collection to the target ICollectionT.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
C#
public static void AddRange<T>(
	this ICollection<T> target,
	IEnumerable<T> collection
)

Parameters

target  ICollectionT
The target collection.
collection  IEnumerableT
The collection to add to the target.

Type Parameters

T
The type of the elements in the collections.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ICollectionT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

Exceptions

ArgumentNullExceptiontarget or collection is .

See Also