Sequence SelectMany TSource, TResult  Method (ISequence TSource , Func TSource, Int32, IEnumerable TResult  )A Sandcastle Documented Class Library
Projects each element of a sequence to an IEnumerable T  and flattens the resulting enumerables into one sequence. The index of each source element is used in the projected form of that element.

Namespace: Sequences
Assembly: Sequences (in Sequences.dll) Version: 1.0.1.0 (1.0.1)
Syntax
public static ISequence<TResult> SelectMany<TSource, TResult>(
	this ISequence<TSource> source,
	Func<TSource, int, IEnumerable<TResult>> selector
)

Parameters

source
Type: Sequences ISequence TSource 
A sequence of values to project.
selector
Type: System Func TSource, Int32, IEnumerable TResult  
A transform function to apply to each element; the second parameter of the function represents the index of the element.
Type Parameters
TSource
The type of the elements of source.
TResult
The type of the elements of the sequence returned by selector.

Return Value

Type: ISequence TResult 
A sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence.

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