'Declaration Public Overloads Shared Function Flatten(Of T)( _ ByVal source As IEnumerable(Of T), _ ByVal childSelector As Func(Of T,IEnumerable(Of T)) _ ) As IEnumerable(Of T)
public static IEnumerable<T> Flatten<T>( IEnumerable<T> source, Func<T,IEnumerable<T>> childSelector )
Parameters
- source
- Source collection.
- childSelector
- function that returns a collection of children for each item
Type Parameters
- T
- Item type
Return Value
Returns a one level list of elements of type T.