- index
- The indexed location within the collection to insert the tree node.
- node
- The System.Windows.Forms.TreeNode to insert into the collection.
If the TreeView.Sorted property is set to true, the index parameter value is ignored. The System.Windows.Forms.TreeNode is inserted into the tree view, and the System.Windows.Forms.TreeView resorted.
You can also add new System.Windows.Forms.TreeNode objects to the collection by using the TreeNodeCollection.Add(string) or TreeNodeCollection.AddRange(TreeNode[]) methods.
To remove a System.Windows.Forms.TreeNode that you previously added, use the TreeNodeCollection.Remove(TreeNode), TreeNodeCollection.RemoveAt(int), or TreeNodeCollection.Clear methods.
A System.Windows.Forms.TreeNode can be assigned to only one System.Windows.Forms.TreeView control at a time. To add the tree node to a new tree view control, you must remove it from the other tree view first or clone it.