Pre-order traversal of a tree, using a user-supplied walking function.

Namespace: HTMLPlusPlus.Utility
Assembly: HTMLPlusPlus (in HTMLPlusPlus.dll) Version: 0.1.0.0 (0.1.0.0)

Syntax

C#
public static IEnumerable<T> Flatten<T>(
	this T current,
	Func<T, IEnumerable<T>> step
)

Parameters

current
Type: T
The root element.
step
Type: System..::..Func<(Of <(<'T, IEnumerable<(Of <(<'T>)>)>>)>)>
The step function. Should return a sequence from the provided element.

Type Parameters

T
The type of the elements.

Return Value

All elements in the tree.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

See Also