Projects each element of a sequence to an
IEnumerable T and flattens the resulting enumerables into one sequence.
Namespace: SequencesAssembly: 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, IEnumerable<TResult>> selector
)
public static ISequence<TResult> SelectMany<TSource, TResult>(
this ISequence<TSource> source,
Func<TSource, IEnumerable<TResult>> selector
)
<ExtensionAttribute>
Public Shared Function SelectMany(Of TSource, TResult) (
source As ISequence(Of TSource),
selector As Func(Of TSource, IEnumerable(Of TResult))
) As ISequence(Of TResult)
<ExtensionAttribute>
Public Shared Function SelectMany(Of TSource, TResult) (
source As ISequence(Of TSource),
selector As Func(Of TSource, IEnumerable(Of TResult))
) As ISequence(Of TResult)
public:
[ExtensionAttribute]
generic<typename TSource, typename TResult>
static ISequence<TResult>^ SelectMany(
ISequence<TSource>^ source,
Func<TSource, IEnumerable<TResult>^>^ selector
)
public:
[ExtensionAttribute]
generic<typename TSource, typename TResult>
static ISequence<TResult>^ SelectMany(
ISequence<TSource>^ source,
Func<TSource, IEnumerable<TResult>^>^ selector
)
static member SelectMany :
source : ISequence<'TSource> *
selector : Func<'TSource, IEnumerable<'TResult>> -> ISequence<'TResult>
static member SelectMany :
source : ISequence<'TSource> *
selector : Func<'TSource, IEnumerable<'TResult>> -> ISequence<'TResult>
Parameters
- source
- Type: Sequences ISequence TSource
A sequence of values to project.
- selector
- Type: System Func TSource, IEnumerable TResult
A transform function to apply to each 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