ListExtensions.Map<TInput, TOutput>

Extension Method in ListExtensions

Declaration

public static List<TOutput> Map<TInput, TOutput>(this List<TInput> list, Converter<TInput, TOutput> converter)

Description

Maps the items of the list to a new list using a converter function.

Type Parameters

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

Parameters

listThe list to map.
converterThe converter to use.

Returns

ListTA new list with the converted items.