System.Windows.Forms.TreeNodeCollection.AddRange Method

Adds an array of previously created tree nodes to the collection.

Syntax

public virtual void AddRange (TreeNode[] nodes)

Parameters

nodes
An array of System.Windows.Forms.TreeNode objects representing the tree nodes to add to the collection.

Remarks

The System.Windows.Forms.TreeNode objects contained in the nodes array are appended to the end of the collection.

You can use the TreeNodeCollection.AddRange(TreeNode[]) method to quickly add a group of previously created System.Windows.Forms.TreeNode objects to the collection instead of manually adding each System.Windows.Forms.TreeNode to the collection using the TreeNodeCollection.Add(string) method.

To remove a System.Windows.Forms.TreeNode that you previously added, use the TreeNodeCollection.Remove(TreeNode), TreeNodeCollection.RemoveAt(int), or TreeNodeCollection.Clear methods.

Requirements

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