System.Windows.Forms.TreeNodeCollection.Count Property

Gets the total number of System.Windows.Forms.TreeNode objects in the collection.

Syntax

[System.ComponentModel.Browsable(false)]
public int Count { get; }

Value

Documentation for this section has not yet been entered.

Remarks

The TreeNodeCollection.Count property holds the number of System.Windows.Forms.TreeNode objects assigned to the collection. You can use the TreeNodeCollection.Count property value as the upper bounds of a loop to iterate through a collection.

Note:

Because the index value of a collection is a zero-based index, you must subtract one from the looping variable. If you do not account for this, you will exceed the upper bounds of the collection and throw an IndexOutOfRangeException exception.

Requirements

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