Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: ListSelectIterator<TInput, TResult> Select<TInput, TResult>(this IList<TInput>, Func<TInput, TResult>)

Declaration

public static ListSelectIterator<TInput, TResult> Select<TInput, TResult>(
    this IList<TInput> source,
    Func<TInput, TResult> selector
)

Summary

Projects each element of a sequence into a new form.

Generic type parameters

TInput The type of the elements of source.
TResult The type of the value returned by selector.

Parameters

this IList<TInput>source A list of values to invoke the transform function on.
Func<TInput, TResult>selector A transform function to apply to each element.

Returns

A collection whose elements are the result of invoking the transform function on each element of source.

Remarks

This method replaces Enumerable.Select<TM1, TM2>(IEnumerable<TM1>, Func<TM1, TM2>) for the case where the input is an IList<T> with an implementation that makes a subsequent ToArray() or ToList() run 15% faster.