CopyTo Method (T[])
Collapse the table of content
Expand the table of content

HashSet<T>.CopyTo Method (T[])

Copies the elements of a HashSet<T> object to an array.

Namespace:  System.Collections.Generic
Assembly:  System.Core (in System.Core.dll)

public void CopyTo(
	T[] array
)

Parameters

array
Type: T[]
The one-dimensional array that is the destination of the elements copied from the HashSet<T> object. The array must have zero-based indexing.

ExceptionCondition
ArgumentNullException

array is null.

This method is an O(n) operation, where n is Count.

Silverlight

Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2016 Microsoft