Returns an enumeration with all nodes in a tree in pre-order.

Namespace: TreeLayoutHelper
Assembly: TreeLayoutHelper (in TreeLayoutHelper.dll) Version: 1.1.0.0 (1.1.0.0)

Syntax

C#
public static IEnumerable<TNode> Preorder<TNode>(
	this ITreeNavigator<TNode> treeNavigator,
	TNode node
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function Preorder(Of TNode) ( _
	treeNavigator As ITreeNavigator(Of TNode), _
	node As TNode _
) As IEnumerable(Of TNode)
Visual C++
[ExtensionAttribute]
public:
generic<typename TNode>
static IEnumerable<TNode>^ Preorder(
	ITreeNavigator<TNode>^ treeNavigator, 
	TNode node
)
J#
J# supports the use of generic APIs, but not the declaration of new ones.
JScript
JScript does not support generic types or methods.
JavaScript
JavaScript does not support generic types or methods.

Parameters

treeNavigator
Type: TreeLayoutHelper..::..ITreeNavigator<(Of <(<'TNode>)>)>
A tree navigator object.
node
Type: TNode
The root node of the tree (or subtree) to consider.

Type Parameters

TNode
The base type of tree nodes.

Return Value

The enumeration.

Usage Note

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

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionAny of the arguments is nullNothingnullptra null reference (Nothing in Visual Basic).

See Also

TreeNavigatorUtilities..::..Preorder<(Of <<'(TNode>)>>)(ITreeNavigator<(Of <<'(TNode>)>>), TNode)