Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Method: ListSelectIterator<TInput, TNewResult> Select<TNewResult>(Func<TResult, TNewResult>)

Declaration

public ListSelectIterator<TInput, TNewResult> Select<TNewResult>(
    Func<TResult, TNewResult> selector
)

Summary

Projects each element of a sequence into a new form.

Generic type parameters

TNewResult The type of the value returned by selector.

Parameters

Func<TResult, TNewResult>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 the current projected list.

Remarks

This method replaces IEnumerable{T}.Select{TSource, TResult}(IEnumerable{TSource},Func{TSource,int,TResult}) for the case where the input is a ListSelectIterator<TInput, TResult> with an implementation that makes a subsequent ToArray() or ToList() run 15% faster.