TreeNodeCollection::IList::Add Method (Object^)
.NET Framework (current version)
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.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Parameters
- node
-
Type:
System::Object^
The object to add to the tree node collection.
Return Value
Type: System::Int32The zero-based index value of the TreeNode that was added to the tree node collection.
Implements
IList::Add(Object^)| 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
Available since 1.1
Show: