System.Web.UI.WebControls.TreeNodeCollection.Remove Method

Removes the specified System.Web.UI.WebControls.TreeNode object from the System.Web.UI.WebControls.TreeNodeCollection object.

Syntax

public void Remove (TreeNode node)

Parameters

node
Documentation for this section has not yet been entered.

Remarks

Use the TreeNodeCollection.Remove(TreeNode) method to remove the specified node from the collection. All items that follow that node are then moved up to fill in the vacant position. The indexes of the moved items are also updated.

Note:

The System.Web.UI.WebControls.TreeNodeCollection can contain null references (Nothing in Visual Basic), as well as duplicate System.Web.UI.WebControls.TreeNode objects.

As an alternative, you can remove a node at a specific index by using the TreeNodeCollection.RemoveAt(int) method. You can also remove every node in the collection by using the TreeNodeCollection.Clear method.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0