-
Notifications
You must be signed in to change notification settings - Fork 36
M_CodeJam_Collections_ArrayExtensions_ConvertAll__2
andrewvk edited this page Mar 30, 2016
·
7 revisions
[This is preliminary documentation and is subject to change.]
Converts an array of one type to an array of another type.
Namespace: CodeJam.Collections
Assembly: CodeJam (in CodeJam.dll) Version: 1.0.0.0 (1.0.0.0)
C#
[NotNullAttribute]
[PureAttribute]
public static TOutput[] ConvertAll<TInput, TOutput>(
[NotNullAttribute] this TInput[] array,
[NotNullAttribute][InstantHandleAttribute] Converter<TInput, TOutput> converter
)
VB
<ExtensionAttribute>
<NotNullAttribute>
<PureAttribute>
Public Shared Function ConvertAll(Of TInput, TOutput) (
<NotNullAttribute> array As TInput(),
<NotNullAttribute><InstantHandleAttribute> converter As Converter(Of TInput, TOutput)
) As TOutput()
F#
[<ExtensionAttribute>]
[<NotNullAttribute>]
[<PureAttribute>]
static member ConvertAll :
[<NotNullAttribute>] array : 'TInput[] *
[<NotNullAttribute>][<InstantHandleAttribute>] 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. |