TreeNodeCollection.IList.Insert Method (Int32, Object)


This API supports the product infrastructure and is not intended to be used directly from your code.

Inserts an existing tree node in the tree node collection at the specified location.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

void IList.Insert(
	int index,
	object node


Type: System.Int32

The indexed location within the collection to insert the tree node.

Type: System.Object

The TreeNode to insert into the collection.

Exception Condition

node is currently assigned to another TreeView.


node is not a TreeNode.

If the Sorted property is set to true, the index parameter is ignored. The TreeNode is inserted into the tree view and the TreeView is sorted again.

.NET Framework
Available since 1.1
Return to top