System.Web.UI.WebControls.TreeNodeCollection.AddAt Method

Inserts the specified System.Web.UI.WebControls.TreeNode object in a System.Web.UI.WebControls.TreeNodeCollection object at the specified index location.

Syntax

public void AddAt (int index, TreeNode child)

Parameters

index
The zero-based index location at which to insert the System.Web.UI.WebControls.TreeNode object.
child
The System.Web.UI.WebControls.TreeNode object to add.

Remarks

Use the TreeNodeCollection.AddAt(int, TreeNode) method to insert the specified System.Web.UI.WebControls.TreeNode object in the System.Web.UI.WebControls.TreeNodeCollection at the specified zero-based index.

Note:

The System.Web.UI.WebControls.TreeNodeCollection allows you to insert null references (Nothing in Visual Basic), as well as duplicate System.Web.UI.WebControls.TreeNode objects.

As an alternative, you can append a System.Web.UI.WebControls.TreeNode object to the end of the System.Web.UI.WebControls.TreeNodeCollection by using the TreeNodeCollection.Add(TreeNode) method.

Requirements

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