[]
Projects each element of a collection to a sequence of collections, flattens the resulting collections into one collection, and invokes a result selector function on each element therein.
public static IIndexedSource<TResult> SelectMany<TSource, TCollection, TResult>(this IIndexedSource<TSource> source, Expression<Func<TSource, IEnumerable<TCollection>>> collectionSelector, Expression<Func<TSource, TCollection, TResult>> resultSelector)
Type | Name | Description |
---|---|---|
IIndexedSource<TSource> | source | A collection of values to project. |
Expression<Func<TSource, IEnumerable<TCollection>>> | collectionSelector | A transform function to apply to each element of the input collection. |
Expression<Func<TSource, TCollection, TResult>> | resultSelector | A transform function to apply to each element of the intermediate sequence. |
Type | Description |
---|---|
IIndexedSource<TResult> | An IIndexedSource<TResult> 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. |
Name | Description |
---|---|
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 collection. |
Projects each element of a collection to a sequence of collections and flattens the resulting collections into one collection.
public static IIndexedSource<TResult> SelectMany<TSource, TResult>(this IIndexedSource<TSource> source, Expression<Func<TSource, IEnumerable<TResult>>> selector)
Type | Name | Description |
---|---|---|
IIndexedSource<TSource> | source | A collection of values to project. |
Expression<Func<TSource, IEnumerable<TResult>>> | selector | A transform function to apply to each element. |
Type | Description |
---|---|
IIndexedSource<TResult> | An IIndexedSource<TResult> whose elements are the result of invoking the one-to-many transform function on each element of the source collection. |
Name | Description |
---|---|
TSource | The type of the elements of source. |
TResult | The type of the elements of the sequence returned by selector. |