ArrayExtensions.Map<TInput, TOutput>

Extension Method in ArrayExtensions

Declaration

public static TOutput[] Map<TInput, TOutput>(this TInput[] array, Converter<TInput, TOutput> converter)

Description

Maps the elements of the array to a new array using a converter function.

Type Parameters

TInputThe type of the input array.
TOutputThe type of the output array.

Parameters

arrayThe array to map.
converterThe converter to use.

Returns

T[]A new array with the converted elements.