TreeNodeCollection.IList.Add Method (Object)

 

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

Adds an object to the end of the tree node collection.

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

int IList.Add(
	object node
)

Parameters

node
Type: System.Object

The object to add to the tree node collection.

Return Value

Type: System.Int32

The zero-based index value of the TreeNode that was added to the tree node collection.

Exception Condition
Exception

node is currently assigned to another TreeView control.

ArgumentNullException

node is null.

If node is not a TreeNodeCollection, the IList.Add method will use the string returned by the ToString method of the TreeNode class.

.NET Framework
Available since 1.1
Return to top
Show: