Click or drag to resize
ArrayListToArray Method (Type)
Copies the elements of the ArrayList to a new array of the specified element type.

Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public virtual Array ToArray(
	Type type
)

Parameters

type
Type: SystemType
The element Type of the destination array to create and copy elements to.

Return Value

Type: Array
An array of the specified element type containing copies of the elements of the ArrayList.
Exceptions
ExceptionCondition
ArgumentNullExceptiontype is null.
InvalidCastExceptionThe type of the source ArrayList cannot be cast automatically to the specified type.
See Also