Converts a collection into an array of the given type.
Namespace:
SGP.XUtilityAssembly: SGP.XUtility (in SGP.XUtility.dll)
Version: 1.2.3019.18718
Syntax
C# |
---|
public static Array ToArray( ICollection collection, Type elementType ) |
Parameters
- collection
- Type: System.Collections..::.ICollection
A common collection.
- elementType
- Type: System..::.Type
A type.
Return Value
An array which elements are taken from the collection.
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentNullException | collection is nullNothingnullptra null reference (Nothing in Visual Basic). |
System..::.ArgumentNullException | elementType is nullNothingnullptra null reference (Nothing in Visual Basic). |