TEnumerable.Select<T,TResult> Method

Overloads

Select<T,TResult>(IEnumerable<T>, Func<T,TResult>)

Projects each element of a sequence into a new form by incorporating the element's index.

Select<T,TResult>(IEnumerable<T>, Func<T,Integer,TResult>)

Projects each element of a sequence into a new form.

Select<T,TResult>(IEnumerable<T>, Func<T,TResult>)

Projects each element of a sequence into a new form by incorporating the element's index.

Delphi
class function Select<T,TResult>(const source: IEnumerable<T>; const selector: Func<T, TResult>): IEnumerable<TResult>

Type Parameters

T

The type of the elements of source .

TResult

The type of the value returned by selector .

Parameters

source
IEnumerable<T>

A sequence of values to invoke a transform function on.

selector
Func<T, TResult>

A transform function to apply to each source element; the second parameter of the function represents the index of the source element.

Returns

IEnumerable<TResult>

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

Exceptions

source or selector is nil .

Select<T,TResult>(IEnumerable<T>, Func<T,Integer,TResult>)

Projects each element of a sequence into a new form.

Delphi
class function Select<T,TResult>(const source: IEnumerable<T>; const selector: Func<T, Integer, TResult>): IEnumerable<TResult>

Type Parameters

T

The type of the elements of source .

TResult

The type of the value returned by selector .

Parameters

source
IEnumerable<T>

A sequence of values to invoke a transform function on.

selector
Func<T, Integer, TResult>

A transform function to apply to each element.

Returns

IEnumerable<TResult>

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

Exceptions

source or selector is nil .