System.Windows.Forms.TreeView.GetNodeCount Method

Retrieves the number of tree nodes, optionally including those in all subtrees, assigned to the tree view control.

Syntax

public int GetNodeCount (bool includeSubTrees)

Parameters

includeSubTrees
true to count the System.Windows.Forms.TreeNode items that the subtrees contain; otherwise, false.

Returns

The number of tree nodes, optionally including those in all subtrees, assigned to the tree view control.

Remarks

If includeSubTrees is true, the result is the number of all the tree nodes in the entire tree structure.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0