Projects each element of a sequence into a new sequence.
Each element's index is used in the logic of the selector function.
Namespace: SequencesAssembly: Sequences (in Sequences.dll) Version: 1.0.1.0 (1.0.1)
Syntax public static ISequence<TResult> Select<TSource, TResult>(
this ISequence<TSource> source,
Func<TSource, int, TResult> selector
)
public static ISequence<TResult> Select<TSource, TResult>(
this ISequence<TSource> source,
Func<TSource, int, TResult> selector
)
<ExtensionAttribute>
Public Shared Function Select(Of TSource, TResult) (
source As ISequence(Of TSource),
selector As Func(Of TSource, Integer, TResult)
) As ISequence(Of TResult)
<ExtensionAttribute>
Public Shared Function Select(Of TSource, TResult) (
source As ISequence(Of TSource),
selector As Func(Of TSource, Integer, TResult)
) As ISequence(Of TResult)
public:
[ExtensionAttribute]
generic<typename TSource, typename TResult>
static ISequence<TResult>^ Select(
ISequence<TSource>^ source,
Func<TSource, int, TResult>^ selector
)
public:
[ExtensionAttribute]
generic<typename TSource, typename TResult>
static ISequence<TResult>^ Select(
ISequence<TSource>^ source,
Func<TSource, int, TResult>^ selector
)
static member Select :
source : ISequence<'TSource> *
selector : Func<'TSource, int, 'TResult> -> ISequence<'TResult>
static member Select :
source : ISequence<'TSource> *
selector : Func<'TSource, int, 'TResult> -> ISequence<'TResult>
Parameters
- source
- Type: Sequences ISequence TSource
A sequence of values to invoke a transform function on.
- selector
- Type: System Func TSource, Int32, TResult
A transform function to apply to each element and its index.
Type Parameters - TSource
- The type of the elements of source.
- TResult
- The type of the elements returned by selector.
Return Value
Type:
ISequence TResult A sequence whose elements are the result of invoking the transform function on each element of
source.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
ISequence TSource . When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also