Click or drag to resize

ExtensionsConvertionsToArray Method

Converts a IEnumerable to an array

Namespace:  Cauldron
Assembly:  Cauldron (in Cauldron.dll) Version: 3.2.0.2
Syntax
public static Object ToArray(
	this IEnumerable source,
	Type elementType
)

Parameters

source
Type: System.CollectionsIEnumerable
The IEnumerable to convert
elementType
Type: SystemType
The element type contained in the IEnumerable

Return Value

Type: Object
An array of elementType

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionsource is null
See Also