System.Web.UI.WebControls.TreeNodeCollection.Add Method

Appends the specified System.Web.UI.WebControls.TreeNode object to the end of the System.Web.UI.WebControls.TreeNodeCollection object.

Syntax

public void Add (TreeNode child)

Parameters

child
The System.Web.UI.WebControls.TreeNode object to append.

Remarks

Use the TreeNodeCollection.Add(TreeNode) method to append the specified System.Web.UI.WebControls.TreeNode object to the end of the System.Web.UI.WebControls.TreeNodeCollection.

Note:

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

As an alternative, you can insert a System.Web.UI.WebControls.TreeNode object in the System.Web.UI.WebControls.TreeNodeCollection at a specific index by using the TreeNodeCollection.AddAt(int, 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