TreeNode.GetNodeCount Method (Boolean)
Returns the number of child tree nodes.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
true if the resulting count includes all tree nodes indirectly rooted at this tree node; otherwise, false.
The following code example sets the PathSeparator property of a TreeView and displays the number of child tree nodes that are contained in the TreeNodeCollection of the SelectedNode. The percentage of child tree node to total tree nodes in the tree view control is also displayed. This example requires that you have a Form with a Button, and a TreeView control with a TreeNodeCollection that has several TreeNode objects (preferably with three or more levels).
Available since 1.1