Skip to content

M_CodeJam_Collections_CollectionExtensions_AddRange__1_1

Andrew Koryavchenko edited this page Jun 17, 2018 · 7 revisions

CollectionExtensions.AddRange(T) Method (ICollection(T), IList(T))

Adds the elements to the end of the ICollection(T).

Namespace: CodeJam.Collections
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0

Syntax

C#

public static void AddRange<T>(
	this ICollection<T> source,
	IList<T> items
)

VB

<ExtensionAttribute>
Public Shared Sub AddRange(Of T) ( 
	source As ICollection(Of T),
	items As IList(Of T)
)

F#

[<ExtensionAttribute>]
static member AddRange : 
        source : ICollection<'T> * 
        items : IList<'T> -> unit 

Parameters

 

source
Type: System.Collections.Generic.ICollection(T)
The collection to add the elements to.
items
Type: System.Collections.Generic.IList(T)
The items to add to the collection.

Type Parameters

 

T
The type of the items that the collection contains.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ICollection(T). 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

Reference

CollectionExtensions Class
AddRange Overload
CodeJam.Collections Namespace

Clone this wiki locally