System.Windows.Forms.TreeNodeCollection Class

Represents a collection of System.Windows.Forms.TreeNode objects.

See Also: TreeNodeCollection Members

Syntax

[System.ComponentModel.Editor("System.Windows.Forms.Design.TreeNodeCollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))]
public class TreeNodeCollection : IList

Remarks

The TreeNodeCollection.Add(string), TreeNodeCollection.Remove(TreeNode), and TreeNodeCollection.RemoveAt(int) methods enable you to add and remove individual tree nodes from the collection.

Note:

Enumerating the collection and removing nodes is not supported.

You can also use the TreeNodeCollection.AddRange(TreeNode[]) or TreeNodeCollection.Clear methods to add or remove all the tree nodes from the collection.

Classes cannot inherit from the System.Windows.Forms.TreeNodeCollection class.

Requirements

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