-
Notifications
You must be signed in to change notification settings - Fork 36
M_CodeJam_Collections_ArrayExtensions_ConvertAll__2
Andrew Koryavchenko edited this page Jun 17, 2018
·
7 revisions
Converts an array of one type to an array of another type.
Namespace: CodeJam.Collections
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0
C#
public static TOutput[] ConvertAll<TInput, TOutput>(
this TInput[] array,
Converter<TInput, TOutput> converter
)
VB
<ExtensionAttribute>
Public Shared Function ConvertAll(Of TInput, TOutput) (
array As TInput(),
converter As Converter(Of TInput, TOutput)
) As TOutput()
F#
[<ExtensionAttribute>]
static member ConvertAll :
array : 'TInput[] *
converter : Converter<'TInput, 'TOutput> -> 'TOutput[]
- array
- Type: TInput[]
The one-dimensional, zero-based Array to convert to a target type. - converter
- Type: System.Converter(TInput, TOutput)
A Converter(TInput, TOutput) that converts each element from one type to another type.
- TInput
- The type of the elements of the source array.
- TOutput
- The type of the elements of the target array.
Type: TOutput[]
An array of the target type containing the converted elements from the source array.
In Visual Basic and C#, you can call this method as an instance method on any object of type . 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).
Exception | Condition |
---|---|
ArgumentNullException | array is null.-or-converter is null. |