Click or drag to resize
AlgorithmsToArrayT Method
Create an array with the items in a collection.

Namespace: X3Platform.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
public static T[] ToArray<T>(
	IEnumerable<T> collection
)

Parameters

collection
Type: System.Collections.GenericIEnumerableT
Collection to create array from.

Type Parameters

T
Element type of the collection.

Return Value

Type: T
An array with the items from the collection, in enumeration order.
Exceptions
ExceptionCondition
ArgumentNullExceptioncollection is null.
Remarks
If collection implements ICollection<T>T, then ICollection<T>.CopyTo() is used to fill the array. Otherwise, the IEnumerable<T>.GetEnumerator() is used to fill the array.
See Also