Clears the destination collection and copies all elements in the specified source collection to the destination.

Namespace:  Endeca.Web.UI
Assembly:  Endeca.Web (in Endeca.Web.dll) Version: 2.1.1.0 (2.1.1.620)

Syntax

C#
public static void CopyTo<T>(
	IEnumerable<T> source,
	ICollection<T> destination
)
Visual Basic (Declaration)
Public Shared Sub CopyTo(Of T) ( _
	source As IEnumerable(Of T), _
	destination As ICollection(Of T) _
)
Visual C++
public:
generic<typename T>
static void CopyTo(
	IEnumerable<T>^ source, 
	ICollection<T>^ destination
)

Parameters

source
Type: System.Collections.Generic..::.IEnumerable<(Of <(T>)>)
Collection from which elements will be copied.
destination
Type: System.Collections.Generic..::.ICollection<(Of <(T>)>)
Collection to which elements will be copied.

Type Parameters

T
Type of element in the source and destination collections.

Exceptions

ExceptionCondition
System..::.ArgumentNullException if source or destination is null.

See Also