Returns the root node for a given tree node.

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

Syntax

C#
public static TNode FindRootNode<TNode>(
	this ITreeNavigator<TNode> treeNavigator,
	TNode node
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function FindRootNode(Of TNode) ( _
	treeNavigator As ITreeNavigator(Of TNode), _
	node As TNode _
) As TNode
Visual C++
[ExtensionAttribute]
public:
generic<typename TNode>
static TNode FindRootNode(
	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
A node at an arbitrary location in the tree.

Type Parameters

TNode
The base type of tree nodes.

Return Value

The root node.

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