Projects each element of a sequence to an IEnumerable T , flattens the resulting enumerables into one sequence, and invokes a result selector function on each element therein.
The index of each source element is used in the intermediate projected form of that element.
Namespace: SequencesAssembly: Sequences (in Sequences.dll) Version: 1.0.1.0 (1.0.1)
Syntax
Parameters
- source
- Type: Sequences ISequence TSource
A sequence of values to project.
- collectionSelector
- Type: System Func TSource, Int32, IEnumerable TCollection
A transform function to apply to each source element; the second parameter of the function represents the index of the source element.
- resultSelector
- Type: System Func TSource, TCollection, TResult
A transform function to apply to each element of the intermediate sequence.
Type Parameters
- TSource
- The type of the elements of source.
- TCollection
- The type of the intermediate elements collected by collectionSelector.
- TResult
- The type of the elements of the resulting sequence.
Return Value
Type: ISequence TResultA sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of source and then mapping each of those sequence elements and their corresponding source element to a result element.
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