Collect
Projects each element of a sequence to an IEnumerable<TResult>
and flattens the resulting sequences into one collection.
Parameters
Returns
Func<T, IEnumerable<TResult>> mapping
IEnumerable<T> source
IEnumerable<TResult>
Usage
A new collection is created by applying the mapping
function in each element. After that, the result is flattened.
This function works like the SelectMany
method.
Creating a new function
Last updated
Was this helpful?