| CollectionExtensionsAddRangeT Method (ICollectionT, T, T, T) |
Adds the elements of the specified collection to the end of the list.
Namespace:
TomsToolbox.Essentials
Assembly:
TomsToolbox.Essentials (in TomsToolbox.Essentials.dll)
Syntax public static void AddRange<T>(
this ICollection<T> target,
T firstItem,
T secondItem,
params T[] moreItems
)
<ExtensionAttribute>
Public Shared Sub AddRange(Of T) (
target As ICollection(Of T),
firstItem As T,
secondItem As T,
ParamArray moreItems As T()
)
Parameters
- target
- Type: System.Collections.GenericICollectionT
The target list. - firstItem
- Type: T
The first item to add. - secondItem
- Type: T
The second item to add. - moreItems
- Type: T
Any more items to add.
Type Parameters
- T
- The type of elements in the list.
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).
See Also